Namespaces
Variants

std:: atomic_notify_one

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
atomic_notify_one
(C++20)
Free functions for atomic flags
헤더에 정의됨 <atomic>
template < class T >
void atomic_notify_one ( std:: atomic < T > * object ) ;
(1) (C++20부터)
template < class T >
void atomic_notify_one ( volatile std:: atomic < T > * object ) ;
(2) (C++20부터)

원자적 통지 작업을 수행합니다.

원자적 대기 연산(즉, std::atomic_wait() , std::atomic_wait_explicit() , 또는 std::atomic::wait() )에서 블록된 스레드가 * object 에 존재하는 경우, 그러한 스레드 중 최소 하나 를 차단 해제합니다; 그렇지 않으면 아무 작업도 수행하지 않습니다.

object - > notify_one ( ) 와 동등합니다.

목차

매개변수

object - 알림을 받을 원자적 객체에 대한 포인터

반환값

(없음)

참고 사항

이러한 형태의 변경 감지는 단순 폴링이나 순수 스핀락보다 종종 더 효율적입니다.

예제

참고 항목

(C++20)
원자적 객체를 대기 중인 스레드 중 최소 하나에 알림
( std::atomic<T> 의 public member function)
(C++20)
원자적 객체를 대기 중인 모든 스레드에 알림
( std::atomic<T> 의 public member function)
atomic_wait에서 블록된 모든 스레드에 알림
(function template)
알림을 받고 원자적 값이 변경될 때까지 스레드를 블록
(function template)