std::counting_semaphore<LeastMaxValue>::release
来自cppreference.com
< cpp | thread | counting
semaphore
并发支持库
|
|
void
release( std::ptrdiff_t
update =
1 );
|
(C++20 起) | |
原子地将内部计数器的值增加 update
。任何等待计数器大于 0 的线程,如由于阻塞于
acquire
者,将继而被除阻。
前条件
update >= 0 与 update <= max()
- counter 均为
true ,其中
counter
是内部计数器的值。
参数
update | - | 要更新计数器的数量 |
异常
可能抛出 std::system_error 。