I have a question of threads that have been bugging me recently. Take a look at this example C# code below.
public void threading()
{
for(int count =0; count< 4; count++)
{
Thread childThread = new Thread(childThread);
childThread.start()
}
return;
}
public void childThread()
{
// Do alot of work
}
As there is a return statement right after the loop within the threading
method, would threading
execute the return statement before the all the child threads finish executing? I read somewhere that threads are different from forks as they do not create a separate memory region so where would a dead thread end up in?