std::experi...ive_and_drop(3)
π NAME π
std::experimental::barrier::arrive_and_drop β std::experimental::barrier::arrive_and_drop
Okay bestie, this page is from the C++ Standard Libary manual, and its title is std::experi...ive_and_drop(3). Yes, βLibaryβ is literally how it appears in the header β we donβt make the rules, we just stan the concurrency TS. π
β¨ Synopsis β¨
void arrive_and_drop(); (concurrency TS)
So whatβs the vibe? You arrive at the barrierβs synchronization point, and you remove the current thread from the set of participating threads. It is unspecified whether this function blocks until the completion phase has ended. No cap. π«Ά
Undefined behavior alert, bestie: the behavior is undefined if the calling thread is not in the set of participating threads of this barrier. Like, do not test fate. π
Calls to arrive_and_drop synchronize with the start of the completion phase of the barrier. If the call blocks, then the completion of the completion phase synchronizes with the return from the call.
Calls to arrive_and_drop and arrive_and_wait never introduce data races with themselves or each other. That part is iconic, honestly. π
π Exceptions π
Throws nothing. Literally nothing. Not even a little drama. π
π¦ Notes π¦
- If every participating thread calls
arrive_and_drop(), the barrier can only be destroyed. Thatβs the whole mood at that point. π - After a thread calls
arrive_and_drop()on a barrier, it is no longer a member of its set of participating threads and hence can no longer call eitherarrive_and_drop()orarrive_and_wait()on the same barrier. Once youβve left the group chat, you canβt keep sending messages. π
π See also π
arrive_and_waitβ arrive at the synchronization point and block (public member function)
Mwah π β this cutie came from http://cppreference.com, dated 2024.06.10, and the footer label is std::experi...ive_and_drop(3). Byeee, go synchronize responsibly! π
π¦ 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