std::experi...ve_and_wait(3)
π NAME π
std::experimental::flex_barrier::arrive_and_waitβstd::experimental::flex_barrier::arrive_and_wait
okay so bestie, this page is std::experi...ve_and_wait(3) from the C++ Standard Libary (their spelling, not mine π), and it's all about the std::experimental::flex_barrier::arrive_and_wait member. π
β¨ Synopsis β¨
void arrive_and_wait(); (concurrency TS)
It blocks and arrives at the flex_barrier's synchronization point. That's the whole vibe.
β οΈ The behavior is undefined if the calling thread is not in the set of participating threads of this flex_barrier. Like, do not. It's giving danger.
Calls to arrive_and_wait synchronize with the start of the completion phase of the flex_barrier. 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. periodt. π
π¦ Notes π¦
- It is safe for a thread to call either
arrive_and_wait()orarrive_and_drop()immediately on return from this call (provided that the function object for the completion phase did not return zero). - It's not necessary to ensure that all blocked threads have exited
arrive_and_wait()before a thread calls it again. - The completion phase executes the function object specified when the
flex_barrierwas constructed. - If it returns
-1, the set of participating threads is unchanged; otherwise, the set of participating threads is a new set with the size equal to the return valueN, and consists of the nextNthreads to arrive at the synchronization point. - If
N == 0, theflex_barriercan only be destroyed. - The initial set of participating threads for a
flex_barrierconstructed fornum_threadsthreads is the firstnum_threadsto arrive at its synchronization point.
πΈ Exceptions πΈ
Throws nothing. literally nothing. not a single throw. π
π See also π
arrive_and_dropβ arrive at the synchronization point and remove the current thread from the set of participating threads (public member function).
mwah π source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::experi...ve_and_wait(3)
π¦ 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