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) | (depuis C++20) |
|
counting_semaphore
(
const
counting_semaphore
&
)
=
delete
;
|
(2) | (depuis C++20) |
1)
Construit un objet de type
std::counting_semaphore
avec le compteur interne initialisé à
desired
.
2)
Le constructeur de copie est supprimé.
Préconditions
1)
Les deux conditions
desired
>=
0
et
desired
<=
max
(
)
sont
true
.
Paramètres
| desired | - |
la valeur avec laquelle initialiser
counting_semaphore
's counter with
|
Exceptions
Ne lance rien.