std::counting_semaphore<LeastMaxValue>::counting_semaphore
来自cppreference.com
< cpp | thread | counting
semaphore
并发支持库
|
|
std::counting_semaphore
成员函数 | ||||
counting_semaphore::counting_semaphore
|
||||
操作 | ||||
常量 | ||||
constexpr
explicit
counting_semaphore( std::ptrdiff_t
desired );
|
(1) | (C++20 起) |
counting_semaphore(
const
counting_semaphore&
) =
delete;
|
(2) | (C++20 起) |
1) 构造一个
std::counting_semaphore
类型对象,初始化其计数器的值为
desired
。2) 复制构造函数被删除。
前条件
1) desired >= 0 与 desired <= max() 均为 true 。
参数
desired | - | 用于初始化 counting_semaphore 的计数器的值
|
异常
不抛出。