std::barrie...ive_and_wait(3)

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

🌸 NAME 🌸

okay so bestie, this is std::barrier::arrive_and_wait β€” and the description is genuinely just std::barrier::arrive_and_wait again. It's giving β€œthe name ate and left no crumbs.” Also, this page is std::barrie...ive_and_wait(3) from the C++ Standard Libary manual (yes, that's the manual name, typo and all β€” not me, fr fr).

✨ Synopsis ✨

void arrive_and_wait();  (since C++20)

It atomically decrements the expected count by 1, then blocks at the synchronization point for the current phase until the phase completion step of the current phase is run. Equivalent to wait(arrive());.

🚨 The behavior is undefined if the expected count for the current phase is zero. That's the danger zone, no cap.

πŸŽ€ Parameters πŸŽ€

(none) β€” literally no parameters. Slay, simple.

πŸ’– Return value πŸ’–

(none) β€” it returns nothing, bestie. It's giving void main character energy.

πŸ”₯ Exceptions πŸ”₯

Throws std::system_error with an error code allowed for mutex types on error. On error only, iykyk.

πŸ¦‹ Notes πŸ¦‹

  • If the current expected count is decremented to zero in the call to this function, the phase completion step is run and this function does not block.
  • If the current expected count is zero before calling this function, the initial expected count for all subsequent phases is also zero, which means the barrier cannot be reused.

🧚 Example 🧚

This section is incomplete Reason: no example

🏷️ Category 🏷️

  • * Todo no example

That's the whole category line, lowkey.


This iconic little page comes from http://cppreference.com, version/date 2024.06.10, and the footer title is std::barrie...ive_and_wait(3) β€” mwah, bye bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from