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
의 카운터를 초기화하는 데 사용할 값
|
예외
아무것도 던지지 않습니다.