Namespaces
Variants

std:: atomic_flag_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
Free functions for atomic flags
atomic_flag_notify_one
(C++20)
Definiert in Header <atomic>
void atomic_flag_notify_one ( std:: atomic_flag * object ) noexcept ;
(1) (seit C++20)
void atomic_flag_notify_one ( volatile std:: atomic_flag * object ) noexcept ;
(2) (seit C++20)

Führt atomare Benachrichtigungsoperationen aus.

Wenn ein Thread in einem atomaren Wartevorgang blockiert ist (d.h. std::atomic_flag_wait() , std::atomic_flag_wait_explicit() , oder std::atomic_flag::wait() ) auf * object , dann wird mindestens ein solcher Thread entblockiert; andernfalls geschieht nichts.

Entspricht object - > notify_one ( ) .

Inhaltsverzeichnis

Parameter

Objekt - Zeiger auf das zu benachrichtigende atomic_flag -Objekt

Rückgabewert

(keine)

Hinweise

Diese Form der Änderungserkennung ist oft effizienter als einfaches Polling oder reine Spinlocks.

Beispiel

Siehe auch

(C++20)
benachrichtigt mindestens einen auf das atomare Objekt wartenden Thread
(öffentliche Elementfunktion von std::atomic_flag )
(C++20)
benachrichtigt alle auf das atomare Objekt blockiert wartenden Threads
(öffentliche Elementfunktion von std::atomic_flag )
benachrichtigt alle in atomic_flag_wait blockierten Threads
(Funktion)