Documentation Home >> Headers >> <jss/experimental_barrier.hpp> Header >> std::experimental::barrier >> std::experimental::barrier::arrive_and_drop member function

Signals that the calling thread has arrived at the synchronization point without blocking. The calling thread is removed from the set of participating threads, and the count of participating threads is thus decreased by one.

void arrive_and_drop();

Preconditions:

Either the calling thread is one of the first N threads to arrive at *this since construction, where N is the value of the num_threads parameter to the constructor, or the calling thread is already one of the set of participating threads for *this.

Effects:

Signal that the calling thread has arrived at the barrier. If this is the last of the participating threads to arrive then all threads blocked on *this are unblocked and the barrier is reset. The calling thread is removed from the set of participating threads.

Throws:

Nothing.

Header

#include <experimental/barrier>

See Also