It's deliberately unspecified by the standard to allow freedom of implementation. Specifically, C++11 §30.5.1 Class condition variable
[thread.condition.condvar] states:
void notify_one() noexcept;
7 Effects: If any threads are blocked waiting for
*this
, unblocks one of those threads.void notify_all() noexcept;
8 Effects: Unblocks all threads that are blocked waiting for
*this
.
There is no claim made about preference/fairness/priority to any thread(s), simply "unblocks one" or "unblocks all."