News for hackers. Stuff that matters.
Re:A simple C++11 thread pool implementation by gpderetta on Thursday January 09, 2020 @11:52AM (#22002807)
You are thinking of FUTEX_*_REQUEUE (see the man page for details). It will move (some of) the waiters from the condvar futex to the mutex futex. IIRC, the optimization is called wait morphing.

IIRC it is so hard to get it right in practice (the number of races and corner cases is staggering) that recent libc versions might have stopped doing it. I might be misremembering though.

There are no comments on this comment yet.