std::experi...tch::~latch(3)

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

✨ NAME ✨

Bestie, this is std::experimental::latch::~latch β€” and the original NAME line is literally std::experimental::latch::~latch - std::experimental::latch::~latch, which is giving redundant-but-make-it-iconic. πŸ’… This page comes from the C++ Standard Libary manual (spelled exactly like that in the source, we don't edit the lore), and the original header is the beautifully truncated std::experi...tch::~latch(3). Folding that in right here so the top stays cute.


🌸 Synopsis 🌸

~latch();  (concurrency TS)

✨ Destroys the latch. That's it. That's the destructor's whole main-character moment.

🚨 The behavior is undefined if a thread is blocked at the synchronization point. Not "oopsie" undefined β€” for-real undefined, bestie. Do not test this.

😭 The destructor may be called even if not all threads have returned from wait() or count_down_and_wait(), provided the internal counter must equal zero. Yes, the internal counter must equal zero. That's the vibe check.

🫢 The destructor may block until all threads have returned from the blocking functions. So it can wait; it's patient like that.

🚫 No thread is allowed to block on this latch after one thread has invoked the destructor. Periodt. πŸ’€


source / version / date tea: http://cppreference.com β€” dated 2024.06.10 β€” and the footer repeats std::experi...tch::~latch(3) in all its truncated glory. Thanks for coming to my terminal talk, bestie. Now go forth and let your latches be destroyed only under valid conditions. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from