fn join(t: *Threaded) void t: *Threaded1727
1728
1729
1730
1731
1732
1733
1734
1735
1736fn join(t: *Threaded) void {
if (builtin.single_threaded) return;
{
mutexLock(&t.mutex);
defer mutexUnlock(&t.mutex);
t.join_requested = true;
}
condBroadcast(&t.cond);
t.wait_group.wait();
}