std::atomic...g_notify_all(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 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 the atomic_flag object 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 of std::atomic_flag.
  • notify_all β€” notifies all threads blocked waiting on the atomic object. (C++20) public member function of std::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 in atomic_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