If a mutex is unlocked outside of a task and all the workers have started to sleep, the unlock will not wake the workers, causing an infinite sleep until new work is enqueue. A condition variable may be required to solve this, used in the fallthrough case where a worker is about to sleep.
If a mutex is unlocked outside of a task and all the workers have started to sleep, the unlock will not wake the workers, causing an infinite sleep until new work is enqueue. A condition variable may be required to solve this, used in the fallthrough case where a worker is about to sleep.