std::barrie...ive_and_drop(3)

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

πŸ’– NAME πŸ’–

std::barrier::arrive_and_drop β€” truly std::barrier::arrive_and_drop, the whole name. The header on this page is std::barrie...ive_and_drop(3) because even manpages get truncation drama 😭, and it lives in the C++ Standard Libary (their spelling, not mine πŸ’…).

🌸 Synopsis 🌸

void arrive_and_drop();

(since C++20)

Okay so here's the lore: it decrements the initial expected count for all subsequent phases by one, and then it decrements the expected count for the current phase by one. Both. In that order. πŸ’–

This function is executed atomically. The call to this function strongly happens-before the start of the phase completion step for the current phase.

⚠️ The behavior is undefined if the expected count for the current phase is zero. Like, do not do that. 😭

πŸŽ€ Parameters πŸŽ€

  • (none)

πŸ¦‹ Return value πŸ¦‹

  • (none)

😭 Exceptions 😭

  • Throws std::system_error with an error code allowed for mutex types on error.

✨ Notes ✨

  • This function can cause the completion step for the current phase to start. Iconic, honestly.
  • 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. That's a one-way trip, bestie. πŸ’€

🧚 Example 🧚

This section is incomplete.

Reason: no example.

πŸ’œ Category πŸ’œ

  • Todo no example

This cutie came from http://cppreference.com and is dated 2024.06.10 β€” source and date, right there, no cap. πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from