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) | (seit C++20) |
|
counting_semaphore
(
const
counting_semaphore
&
)
=
delete
;
|
(2) | (seit C++20) |
1)
Konstruiert ein Objekt vom Typ
std::counting_semaphore
mit dem internen Zähler, der auf
desired
initialisiert ist.
2)
Copy-Konstruktor ist gelöscht.
Vorbedingungen
1)
Beide
desired
>=
0
und
desired
<=
max
(
)
sind
true
.
Parameter
| gewünscht | - |
der Wert, mit dem der Zähler des
counting_semaphore
initialisiert werden soll
|
Exceptions
Wirft nichts.