dcc1ad6a23
During destruction the main thread locks the mutex in processor_t and waits on a condvar for threads to have terminated. Because the mutex has also to be locked to decrement the thread count the condvar cannot be signaled before doing that as otherwise the main thread might already be waiting to join the threads while locking the mutex and thus causing a deadlock. |
||
---|---|---|
.. | ||
jobs | ||
processor.c | ||
processor.h | ||
scheduler.c | ||
scheduler.h |