Re: [Issue 4307] New: spawn()'ed thread doesn't terminate

2010-06-16 Thread Sean Kelly
Never mind, I'll fix it.  This will require adding an atexit() sort of routine 
to druntime, which I believe was requested in another ticket anyway.


Re: [Issue 4307] New: spawn()'ed thread doesn't terminate

2010-06-15 Thread Sean Kelly
The main thread is somewhat special in D--it doesn't actually terminate until 
all other threads have terminated.  And because the "OwnerTerminated" message 
is sent in a static dtor, the ordering is wrong for having spawned threads 
receive this message.  I'll leave it up to Andrei to decide whether this is 
correct behavior or if the OwnerTerminated message should be sent when D main() 
exits (I'm leaning towards this latter behavior myself).  If a change is 
necessary I'll have to add a stack for onMainExit callbacks to be executed in 
druntime.