◐ Shell
clean mode source ↗

std::condition_variable::condition_variable - cppreference.com

[编辑模板]

并发支持库

线程

(C++11)

(C++20)

this_thread 命名空间

(C++11)

(C++11)

(C++11)

协作式取消
互斥

(C++11)

通用锁管理

(C++11)

(C++11)

(C++11)

(C++11)

(C++11)

条件变量

(C++11)

信号量
闩与屏障

(C++20)

(C++20)

未来体

(C++11)

(C++11)

(C++11)

(C++11)

安全回收
读-复制-更新机制

(C++26)

风险指针
原子类型

(C++11)

(C++20)

原子类型的初始化

(C++11)(C++20 弃用)

(C++11)(C++20 弃用)

内存定序

(C++11)(C++26 弃用)

原子操作的自由函数
原子标志的自由函数
condition_variable();
(1) (C++11 起)
condition_variable( const condition_variable& ) = delete;
(2) (C++11 起)

1) 构造 std::condition_variable 类型的对象。

2) 复制构造函数被弃置。

参数

(无)

异常

1) 可能抛出 std::system_error,它的 std::error_condition 在线程没有创建条件变量的权限时等于 std::errc::operation_not_permitted,在某项非内存资源限制阻止这此初始化时等于 std::errc::resource_unavailable_try_again,或者等于其他由实现定义的值。

参阅

cnd_init 的 C 文档