Namespaces
Variants

std::latch:: latch

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
constexpr explicit latch ( std:: ptrdiff_t expected ) ;
(1) (C++20 이후)
latch ( const latch & ) = delete ;
(2) (C++20 이후)
1) latch 를 생성하고 내부 카운터를 초기화합니다. expected 값이 음수이거나 max() 보다 큰 경우의 동작은 정의되지 않습니다.
2) 복사 생성자가 삭제되었습니다. latch 는 복사 가능하지도 이동 가능하지도 않습니다.

매개변수

expected - 내부 카운터의 초기값

예외

아무것도 던지지 않습니다.