Namespaces
Variants

std::barrier<CompletionFunction>:: arrive

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
arrival_token arrive ( std:: ptrdiff_t n = 1 ) ;
(C++20부터)

현재 페이즈의 동기화 지점과 연관된 arrival_token 객체를 생성합니다. 그런 다음 예상 카운트를 n 만큼 감소시킵니다.

이 함수는 원자적으로 실행됩니다. 이 함수에 대한 호출은 strongly happens-before 현재 단계의 단계 완료 시작 전에 강력하게 발생합니다.

n 이 0보다 작거나 같거나 현재 배리어 단계의 예상 횟수보다 큰 경우 동작은 정의되지 않습니다.

목차

매개변수

n - 기대 카운트가 감소하는 값

반환값

생성된 arrival_token 객체.

예외

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

참고 사항

이 함수는 현재 단계의 완료 단계를 시작할 수 있습니다.

예제

참고 항목

페이즈 동기화 지점에서 해당 페이즈 완료 단계가 실행될 때까지 블록합니다
(public member function)