std::latch::wait(3)

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

πŸ’… std::latch::wait(3) πŸ’…

okay so we're in the C++ Standard Libary bestie β€” that's the manual name right there, and yes the header spells it "Libary", I'm just the messenger πŸ«‘πŸ’–. This page is all about std::latch::wait, and it's giving "wait for the count to hit zero" main character energy.


✨ NAME ✨

std::latch::wait β€” std::latch::wait

πŸŽ€ Synopsis πŸŽ€

void wait() const;  (since C++20)

Blocks the calling thread until the internal counter reaches 0. If it is zero already, returns immediately.

🌸 Parameters 🌸

  • (none) β€” literally none, zero parameters, not a single one, we love a low-maintenance icon 🫢

πŸ¦‹ Return value πŸ¦‹

  • (none) β€” it's void, bestie, it returns absolutely nothing and it's still iconic πŸ’…

πŸ’€ Exceptions πŸ’€

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


lowkey this is your reminder that "wait" means block the calling thread, not "wait a lil sec and vibe" β€” it's the real deal, no cap πŸ”₯

byeee, source/version is http://cppreference.com, date is 2024.06.10, and this is the std::latch::wait(3) page from the C++ Standard Libary β€” mwah, slay, periodt πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from