libcoro  1.0
Coroutine support library for C++20

◆ notify_condition() [1/2]

template<typename T >
void coro::notify_condition ( const T &  var)
noexcept

notifies variable about change in the condition.

Parameters
varreference to shared variable.

Tests all conditions and resumes all coroutines, where condition is fulfilled.

It is not UB when variable is already destroyed. You can pass anything. If the variable is not awaited, nothing happens.

See also
condition

Definition at line 293 of file condition.h.