libstdc++: std::condition_variable Class Reference

libstdc++

std::condition_variable Class Reference
Concurrency » Condition Variables

`#include <condition_variable>`

## Public Types
typedef __gthread_cond_t * | native_handle_type

## Public Member Functions
| condition_variable (const condition_variable &)=delete
native_handle_type | native_handle ()
void | notify_all () noexcept
void | notify_one () noexcept
condition_variable & | operator= (const condition_variable &)=delete
void | wait (unique_lock< mutex > &__lock)
template<typename _Predicate>
void | wait (unique_lock< mutex > &__lock, _Predicate __p)
template<typename _Rep, typename _Period>
cv_status | wait_for (unique_lock< mutex > &__lock, chrono::duration< _Rep, _Period > __rtime)
template<typename _Rep, typename _Period, typename _Predicate>
bool | wait_for (unique_lock< mutex > &__lock, chrono::duration< _Rep, _Period > __rtime, _Predicate __p)
template<typename _Clock, typename _Duration>
cv_status | wait_until (unique_lock< mutex > &__lock, chrono::time_point< _Clock, _Duration > __atime)
template<typename _Clock, typename _Duration, typename _Predicate>
bool | wait_until (unique_lock< mutex > &__lock, chrono::time_point< _Clock, _Duration > __atime, _Predicate __p)
template<typename _Duration>
cv_status | wait_until (unique_lock< mutex > &__lock, chrono::time_point< steady_clock, _Duration > __atime)
template<typename _Duration>
cv_status | wait_until (unique_lock< mutex > &__lock, chrono::time_point< system_clock, _Duration > __atime)

## Detailed Description

condition_variable

Definition at line 72 of file condition_variable.

## Member Typedef Documentation

## ◆ native_handle_type

typedef __gthread_cond_t* std::condition_variable::native_handle_type

Definition at line 85 of file condition_variable.

## Member Function Documentation

## ◆ native_handle()

native_handle_type std::condition_variable::native_handle | ( |  | ) |
| inline

Definition at line 191 of file condition_variable.

## ◆ wait()

template<typename _Predicate>

void std::condition_variable::wait | ( | unique_lock< mutex > & | __lock,
|  | _Predicate | __p )
| inline

Definition at line 104 of file condition_variable.

## ◆ wait_for() [1/2]

template<typename _Rep, typename _Period>

cv_status std::condition_variable::wait_for | ( | unique_lock< mutex > & | __lock,
|  | chrono::duration< _Rep, _Period > | __rtime )
| inline

Definition at line 166 of file condition_variable.

## ◆ wait_for() [2/2]

template<typename _Rep, typename _Period, typename _Predicate>

bool std::condition_variable::wait_for | ( | unique_lock< mutex > & | __lock,
|  | chrono::duration< _Rep, _Period > | __rtime,
|  | _Predicate | __p )
| inline

Definition at line 179 of file condition_variable.

## ◆ wait_until() [1/4]

template<typename _Clock, typename _Duration>

cv_status std::condition_variable::wait_until | ( | unique_lock< mutex > & | __lock,
|  | chrono::time_point< _Clock, _Duration > | __atime )
| inline

Definition at line 129 of file condition_variable.

## ◆ wait_until() [2/4]

template<typename _Clock, typename _Duration, typename _Predicate>

bool std::condition_variable::wait_until | ( | unique_lock< mutex > & | __lock,
|  | chrono::time_point< _Clock, _Duration > | __atime,
|  | _Predicate | __p )
| inline

Definition at line 154 of file condition_variable.

## ◆ wait_until() [3/4]

template<typename _Duration>

cv_status std::condition_variable::wait_until | ( | unique_lock< mutex > & | __lock,
|  | chrono::time_point< steady_clock, _Duration > | __atime )
| inline

Definition at line 116 of file condition_variable.

## ◆ wait_until() [4/4]

template<typename _Duration>

cv_status std::condition_variable::wait_until | ( | unique_lock< mutex > & | __lock,
|  | chrono::time_point< system_clock, _Duration > | __atime )
| inline

Definition at line 123 of file condition_variable.

The documentation for this class was generated from the following file:

- condition_variable