Namespaces
Variants

std::barrier<CompletionFunction>:: wait

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
void wait ( arrival_token && arrival ) const ;
(seit C++20)

Wenn arrival mit dem Phasensynchronisationspunkt für die aktuelle Phase von * this assoziiert ist, blockiert es am Synchronisationspunkt, der mit arrival verbunden ist, bis der Phasenabschluss-Schritt der Phase des Synchronisationspunkts ausgeführt wird.

Andernfalls, wenn arrival mit dem Phasensynchronisationspunkt für die unmittelbar vorhergehende Phase von * this assoziiert ist, kehrt es sofort zurück.

Andernfalls, d.h. wenn arrival dem Phasensynchronisationspunkt für eine frühere Phase von * this oder einer beliebigen Phase eines anderen Barrier-Objekts als * this zugeordnet ist, ist das Verhalten undefiniert.

Inhaltsverzeichnis

Parameter

Ankunft - ein arrival_token erhalten durch einen vorherigen Aufruf von arrive auf derselben barrier

Rückgabewert

(keine)

Ausnahmen

Wirft std::system_error mit einem für Mutex-Typen zulässigen Fehlercode bei Fehler.

Beispiel

Siehe auch

trifft an der Barriere ein und dekrementiert die erwartete Anzahl
(öffentliche Elementfunktion)