std::barrie...ive_and_wait(3)
πΈ 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
- 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