条件变量类
更多...
#include <condition_variable.hpp>
|
|
using | base_type = _INNER condition_variable_base |
| | 基类类型
|
|
using | native_handle_type = base_type::native_handle_type |
| | 原生句柄类型
|
|
using | clock_type = _MSTL steady_clock |
| | 默认时钟类型
|
|
|
| condition_variable ()=default |
| | 构造函数
|
|
| ~condition_variable ()=default |
| | 析构函数
|
| native_handle_type * | native_handle () noexcept |
| | 获取原生句柄
|
|
void | notify_one () noexcept |
| | 通知一个等待线程
|
|
void | notify_all () noexcept |
| | 通知所有等待线程
|
| void | wait (smart_lock< mutex > &lock) |
| | 无限期等待
|
| template<typename Pred> |
| void | wait (smart_lock< mutex > &lock, Pred pred) |
| | 带谓词的无限期等待
|
| template<typename Dur> |
| cv_status | wait_until (smart_lock< mutex > &lock, const time_point< steady_clock, Dur > &util) |
| | 等待直到稳定时钟时间点
|
| template<typename Dur> |
| cv_status | wait_until (smart_lock< mutex > &lock, const time_point< system_clock, Dur > &util) |
| | 等待直到系统时钟时间点
|
| template<typename Clock, typename Dur> |
| cv_status | wait_until (smart_lock< mutex > &lock, const time_point< Clock, Dur > &util) |
| | 等待直到任意时钟时间点
|
| template<typename Clock, typename Dur, typename Pred> |
| bool | wait_until (smart_lock< mutex > &lock, const time_point< Clock, Dur > &util, Pred pred) |
| | 带谓词的等待直到时间点
|
| template<typename Rep, typename Period> |
| cv_status | wait_for (smart_lock< mutex > &lock, const duration< Rep, Period > &rest) |
| | 等待指定的持续时间
|
| template<typename Rep, typename Period, typename Pred> |
| bool | wait_for (smart_lock< mutex > &lock, const duration< Rep, Period > &rest, Pred pred) |
| | 带谓词的等待指定持续时间
|
条件变量类
条件变量允许线程等待某个条件成立,或通知其他线程条件已满足。
在文件 condition_variable.hpp 第 119 行定义.
◆ native_handle()
◆ wait() [1/2]
◆ wait() [2/2]
◆ wait_for() [1/2]
template<typename Rep, typename Period>
◆ wait_for() [2/2]
template<typename Rep, typename Period, typename Pred>
◆ wait_until() [1/4]
template<typename Clock, typename Dur>
◆ wait_until() [2/4]
template<typename Clock, typename Dur, typename Pred>
◆ wait_until() [3/4]
◆ wait_until() [4/4]
该类的文档由以下文件生成: