Documentation Home >> Headers >> <condition_variable> Header >> std::condition_variable >> std::condition_variable::notify_all Member function

Wake all of the threads currently waiting on a std::condition_variable.

void notify_all();

Effects:

Wake all of the threads waiting on *this at the point of the call. If there are no threads waiting, the call has no effect.

Throws:

std::system_error if the effects cannot be achieved.

Synchronization:

Calls to notify_one(), notify_all(), wait(), wait_for() and wait_until() on a single std::condition_variable instance are serialized. A call to notify_one() or notify_all() will only wake threads that started waiting prior to that call.

Header

#include <condition_variable>

See Also