std::experimental::latch(3)
π NAME π
okay so bestie, this is the std::experimental::latch page from the C++ Standard Libary manual, and itβs literally the same name twice: std::experimental::latch β std::experimental::latch. iconic, no notes π
β¨ SYNOPSIS β¨
Defined in header <experimental/latch>:
class latch; (concurrency TS)
The latch class is a downward counter of type ptrdiff_t that can be used to synchronize threads. The counterβs value gets initialized on creation. Threads may block on the latch until the counter is decremented all the way to zero. There is no possibility to increase or reset the counter, which makes the latch a single-use barrier. periodt π«Ά
Unlike std::experimental::barrier, std::experimental::latch can be decremented by a participating thread more than once. slay for flexibility π₯
π MEMBER FUNCTIONS π
- constructor β constructs a latch (
public member function) π§ - destructor β destroys the latch (
public member function) π operator=β not copy-assignable; itβs marked[deleted](public member function) πcount_down_and_waitβ decrements the counter by1and blocks until it reaches zero (public member function) βcount_downβ decrements the counter in a non-blocking manner (public member function) πis_readyβ tests if the internal counter equals zero (public member function) πwaitβ blocks until the counter reaches zero (public member function) πΈ
mwah π β source: http://cppreference.com, version/date: 2024.06.10, and the page is std::experimental::latch(3). thatβs the whole vibe check, 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