mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime d2ee11364c. * testsuite/libphobos.aa/test_aa.d: Add new test. * testsuite/libphobos.betterc/test19933.d: Adjust imports. * testsuite/libphobos.config/test22523.d: Likewise. * testsuite/libphobos.exceptions/assert_fail.d: Adjust test. * testsuite/libphobos.exceptions/chain.d: Adjust imports. * testsuite/libphobos.exceptions/future_message.d: Likewise. * testsuite/libphobos.exceptions/line_trace.d: Likewise. * testsuite/libphobos.exceptions/long_backtrace_trunc.d: Likewise. * testsuite/libphobos.exceptions/static_dtor.d: Likewise. * testsuite/libphobos.gc/forkgc.d: Likewise. * testsuite/libphobos.gc/precisegc.d: Likewise. * testsuite/libphobos.gc/recoverfree.d: Likewise. * testsuite/libphobos.hash/test_hash.d: Likewise. * testsuite/libphobos.init_fini/custom_gc.d: Likewise. * testsuite/libphobos.init_fini/thread_join.d: Likewise. * testsuite/libphobos.thread/external_threads.d: Likewise. * testsuite/libphobos.thread/fiber_guard_page.d: Likewise. * testsuite/libphobos.thread/tlsgc_sections.d: Likewise. * testsuite/libphobos.thread/tlsstack.d: Likewise. * testsuite/libphobos.unittest/customhandler.d: Likewise.
18 lines
426 B
D
18 lines
426 B
D
// Bugzilla 11309 - std.concurrency: OwnerTerminated message doesn't work
|
|
// We need to assure that the thread dtors of parent threads run before the thread dtors of the child threads.
|
|
import core.thread, core.sync.semaphore;
|
|
|
|
__gshared Semaphore sem;
|
|
|
|
static ~this()
|
|
{
|
|
if (sem !is null) sem.notify();
|
|
}
|
|
|
|
void main()
|
|
{
|
|
sem = new Semaphore;
|
|
auto thr = new Thread({assert(sem.wait(1.seconds));});
|
|
thr.start();
|
|
}
|