How many waiting threads will wake up in this example:
1st thread:
void wakeUp2Threads() { std::unique_lock lo
The notify_one call atomically unblocks one thread. That means that when called a second time it can't unblock the same thread as it's no longer blocked.
notify_one
This is specified in the standard at section 30.5/3 and 30.5.1/7.