1 // Bugzilla 11309 - std.concurrency: OwnerTerminated message doesn't work
2 // We need to assure that the thread dtors of parent threads run before the thread dtors of the child threads.
3 import core
.thread
, core
.sync
.semaphore
;
4 import core
.stdc
.stdio
;
6 __gshared Semaphore sem
;
10 if (sem
!is null) sem
.notify();
16 auto thr
= new Thread({assert(sem
.wait(1.seconds
));});