Namespaces
Variants

std:: atomic_notify_all

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_all
(C++20)
Free functions for atomic flags
ヘッダー <atomic> で定義
template < class T >
void atomic_notify_all ( std:: atomic < T > * object ) ;
(1) (C++20以降)
template < class T >
void atomic_notify_all ( volatile std:: atomic < T > * object ) ;
(2) (C++20以降)

アトミックな通知操作を実行します。

アトミック待機操作(すなわち std::atomic_wait() std::atomic_wait_explicit() または std::atomic::wait() )でブロックされているすべてのスレッドを * object 上で解除する。ブロックされているスレッドがない場合は何も行わない。

object - > notify_all ( ) と同等です。

目次

パラメータ

object - 通知対象のアトミックオブジェクトへのポインタ

戻り値

(なし)

注記

この形式の変更検出は、単純なポーリングや純粋なスピンロックよりも効率的な場合が多いです。

関連項目

(C++20)
アトミックオブジェクトを待機している少なくとも1つのスレッドに通知する
( std::atomic<T> の公開メンバ関数)
(C++20)
アトミックオブジェクトを待機しているすべてのスレッドに通知する
( std::atomic<T> の公開メンバ関数)
通知があり、アトミック値が変更されるまでスレッドをブロックする
(関数テンプレート)
atomic_waitでブロックされているスレッドに通知する
(関数テンプレート)