std::condition_variable

From Cppreference

Jump to: navigation, search
Defined in header <condition_variable>

class condition_variable;
(C++11 feature)

The condition_variable class manages threads that wait on some mutex. The notification facilities are provided.

The class is not copy-constructible, move-constructible, copy-assignable, move-assignable.

Contents

[edit] Member types

Member type Definition
native_handle_type implementation-defined

[edit] Member functions

(constructor)
constructs the object
(public member function)
(destructor)
destructs the object
(public member function)
operator= [deleted] not copy-assignable
(public member function)
Notification
notify_one
notifies one waiting thread
(public member function)
notify_all
notifies all waiting threads
(public member function)
Waiting
wait
blocks the current thread until the condition variable is woken up
(public member function)
wait_for
blocks the current thread until the condition variable
is woken up or after the specified timeout duration
(public member function)
wait_until
blocks the current thread until the condition variable
is woken up or until specified time point has been reached
(public member function)
Native handle
native_handle
returns the native handle
(public member function)