std::atomic...:notify_all(3)
β¨ NAME β¨
okay so bestie, welcome to std::atomic...:notify_all(3) from the C++ Standard Libary manual π
β the actual star of the page is std::atomic_flag::notify_all. Thatβs the name, thatβs the vibe, periodt.
πΈ Synopsis πΈ
void notify_all() noexcept; (1) (since C++20)
void notify_all() volatile noexcept; (2) (since C++20)
It performs atomic notifying operations β¨
What does that mean? It unblocks all threads that are blocked in atomic waiting operations (i.e. wait()) on *this, if there are any; otherwise it does nothing. Literally nothing. A whole lot of nothing. π«Ά
π¦ Return value π¦
(none) β yep, it returns absolutely nothing, and thatβs iconic of it.
π Notes π
This form of change-detection is often more efficient than simple polling or pure spinlocks. No cap, thatβs the note. π
π Example π
This section is incomplete.
Reason: no example π«
π₯ See also π₯
waitβ blocks the thread until notified and the atomic value changes.(C++20)(public member function)atomic_flag_waitβ(C++20)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 π§
- Todo no example
mwah π this page is from http://cppreference.com, version/date 2024.06.10, and its footer title is std::atomic...:notify_all(3). 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