News for hackers. Stuff that matters.
Re:A simple C++11 thread pool implementation by gpderetta on Thursday January 09, 2020 @12:02PM (#22002956)
> its usually a bug to not hold the lock before notify()

All correct non-realtime uses uses of condition variables should work fine with notify called outside of the critical section.

The only case it matters is when using strict realtime scheduling (SCHED_FIFO and SCHED_RR) and it is important that higher priority threads are woken up before lower priority ones.

There are no comments on this comment yet.