Standard library header <barrier> (C++20)
From cppreference.net
C++
Standard library headers
이 헤더는 스레드 지원 라이브러리의 일부입니다.
Classes |
|
|
(C++20)
|
재사용 가능한 스레드 배리어
(클래스 템플릿) |
시놉시스
namespace std { template<class CompletionFunction = /* 설명 참조 */> class barrier; }
클래스 템플릿 std::barrier
namespace std { template<class CompletionFunction = /* 설명 참조 */> class barrier { public: using arrival_token = /* 설명 참조 */; static constexpr ptrdiff_t max() noexcept; constexpr explicit barrier(ptrdiff_t expected, CompletionFunction f = CompletionFunction()); ~barrier(); barrier(const barrier&) = delete; barrier& operator=(const barrier&) = delete; arrival_token arrive(ptrdiff_t update = 1); void wait(arrival_token&& arrival) const; void arrive_and_wait(); void arrive_and_drop(); private: CompletionFunction completion; // 설명 전용 }; }