std::experi...tch::~latch(3)
β¨ 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
- 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