std::atomic...g_notify_all(3)
πΈ NAME πΈ
okay so bestie, welcome to the std::atomic_flag_notify_all page π this is the std::atomic...g_notify_all(3) manual page from the C++ Standard Library, and yes the function name is literally:
std::atomic_flag_notify_allβstd::atomic_flag_notify_all
periodt, that's the name π
π¦ Synopsis π¦
Defined in header <atomic>:
void atomic_flag_notify_all( std::atomic_flag* object ) noexcept;
(1) (since C++20)
void atomic_flag_notify_all( volatile std::atomic_flag* object )
noexcept;
(2) (since C++20)
So this function performs atomic notifying operations β¨ it unblocks all threads blocked in atomic waiting operations β specifically std::atomic_flag_wait(), std::atomic_flag_wait_explicit(), or std::atomic_flag::wait() β on *object, if there are any. If there aren't any, it does nothing. Literally nothing, no cap π
It is equivalent to object->notify_all().
π Parameters π
objectβ pointer to theatomic_flagobject to notify π«Ά
β¨ Return value β¨
none π literally nothing comes back, bestie.
π Notes π
This form of change-detection is often more efficient than simple polling or pure spinlocks. highkey iconic behavior, ngl π₯
π Example π
This section is incomplete Reason: no example
not me noticing there's no example π it's giving unfinished homework, but that's what the page says π
π See also π
notify_oneβ notifies at least one thread waiting on the atomic object. (C++20) public member function ofstd::atomic_flag.notify_allβ notifies all threads blocked waiting on the atomic object. (C++20) public member function ofstd::atomic_flag.atomic_flag_waitβ blocks the thread until notified and the flag changes. (C++20) function.atomic_flag_wait_explicitβ blocks the thread until notified and the flag changes. (C++20) function.atomic_flag_notify_oneβ notifies a thread blocked inatomic_flag_wait. (C++20) function.
π Category π
- Category: Todo no example
okay that's the whole page, bestie π§π shoutout to cppreference.com, dated 2024.06.10 β and yes, that's the cute little footer energy at the very end. slay β¨π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms