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 ;
(C++20부터)

만약 arrival 이 현재 단계의 위상 동기화 지점과 연관되어 있다면, * this 와 연관된 동기화 지점에서 arrival 의 위상 완료 단계가 실행될 때까지 블록됩니다.

그렇지 않으면, arrival 이 바로 앞 단계의 위상 동기화 지점과 연관되어 있는 경우, 즉시 반환됩니다.

그렇지 않은 경우, 즉 arrival * this 의 이전 단계 또는 * this 가 아닌 다른 배리어 객체의 어떤 단계에 대한 위상 동기화 지점과 연관된 경우, 동작은 정의되지 않습니다.

목차

매개변수

arrival - 이전에 동일한 barrier 에서 arrive 호출로 획득한 arrival_token

반환값

(없음)

예외

오류 발생 시 뮤텍스 타입에 허용되는 오류 코드와 함께 std::system_error 를 발생시킵니다.

예제

참고 항목

배리어에 도착하여 예상 카운트를 감소시킴
(public member function)