std::counting_semaphore<LeastMaxValue>:: counting_semaphore
From cppreference.net
<
cpp
|
thread
|
counting semaphore
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::counting_semaphore
| Member functions | ||||
|
counting_semaphore::counting_semaphore
|
||||
| Operations | ||||
| Constants | ||||
|
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
のカウンターを初期化する値
|
例外
例外を送出しません。