I read this question and some documentation, and I would want to know if these two codes are equivalent:
in Java SE8:
Thread th1 = new Thread(() -> { doStuff(); });
th1.setDaemon(true);
th1.start();
In C#:
Thread th1 = new Thread(doStuff);
th1.IsBackground = true;
th1.Start();
I've read the MSDN documentation, but I wanted to know it they are equivalent from the framework point of view (garbage collection, finalizers, memory management, etc). In both cases: th1 dies in the same way after its parent thread "dies"?
MSDN mentions "a process", but Oracle mentions "the JVM itself". This is what confuses me.