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) | (desde C++20) |
|
counting_semaphore
(
const
counting_semaphore
&
)
=
delete
;
|
(2) | (desde C++20) |
1)
Construye un objeto de tipo
std::counting_semaphore
con el contador interno inicializado a
desired
.
2)
El constructor de copia está eliminado.
Precondiciones
1)
Ambos
desired
>=
0
y
desired
<=
max
(
)
son
true
.
Parámetros
| desired | - |
el valor con el cual inicializar
counting_semaphore
's counter with
|
Excepciones
No lanza nada.