in reply to Re^6: using many threads and conserving stack size
in thread using many threads and conserving stack size
Well, if you want to be sure a thread has finished, in a sense you need to know the final report has been completed -- you're just not going to read it.
The polite thing to do is to wait for the report, collect it, but wait at least until the thread has left your office before tossing the report in the bin.
I look at it this way: when the mother thread terminates the system could wait for all the child threads to finish before knocking the process on the head. But it cannot know that the main thread has terminated cleanly, so the children may be on its hands forever waiting for their dead mother, taking up space, demanding attention, needing to be changed, etc. So the system promptly shoot them -- it's a hard world, with no room for motherless threads.
I suppose mother could somehow promise the system that all the children will leave soon, of their own accord. But, frankly, would you take the word of a delinquent mother ? As if !
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: using many threads and conserving stack size
by Zen (Deacon) on Nov 12, 2008 at 23:05 UTC |