Namespaces
Variants

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

호출 스레드는 내부 카운터가 0 에 도달할 때까지 차단됩니다. 이미 0이라면 즉시 반환됩니다.

매개변수

(없음)

반환값

(없음)

예외

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