Namespaces
Variants

std:: atomic_flag_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
Free functions for atomic flags
atomic_flag_notify_all
(C++20)
定義済みヘッダー <atomic>
void atomic_flag_notify_all ( std:: atomic_flag * object ) noexcept ;
(1) (C++20以降)
void atomic_flag_notify_all ( volatile std:: atomic_flag * object ) noexcept ;
(2) (C++20以降)

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

アトミック待機操作(すなわち std::atomic_flag_wait() std::atomic_flag_wait_explicit() または std::atomic_flag::wait() )でブロックされているすべてのスレッドのブロックを解除する。該当するスレッドが存在しない場合は何も行わない。

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

目次

パラメータ

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

戻り値

(なし)

注記

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

関連項目

(C++20)
アトミックオブジェクトを待機している少なくとも1つのスレッドに通知する
( std::atomic_flag の public member function)
(C++20)
アトミックオブジェクトを待機している全てのスレッドに通知する
( std::atomic_flag の public member function)
通知されるまでスレッドをブロックし、フラグが変更されるのを待つ
(function)
atomic_flag_waitでブロックされているスレッドに通知する
(function)