home | help
std::experi...flex_barrier(3)  C++ Standard Libary std::experi...flex_barrier(3)

NAME
     std::experimental::flex_barrier - std::experimental::flex_barrier

Synopsis
	Defined in header <experimental/barrier>
	class flex_barrier;			  (concurrency TS)

	The class std::experimental::flex_barrier provides a thread-coordination
     mechanism
	that  allows  a set of participating threads to block until an operation
     is completed.
	Unlike std::experimental::latch, barriers are reusable; once the partic-
     ipating
	threads are released from a barrier's synchronization  point,  they  can
     reuse the same
	barrier.

	A  barrier  has a completion phase, which is executed by one of the par-
     ticipating
	threads once all threads in the set of participating threads  arrive  at
     the
	synchronization  point.  The  arrive_and_wait  and arrive_and_drop calls
     synchronize
	with the start of the completion phase; the end of the completion  phase
     synchronizes
	with the returns from all calls blocked by its completion.

	std::experimental::flex_barrier  allows  the user to control the comple-
     tion phase with
	a function object. If the function object returns -1, the set of partic-
     ipating
	threads is unchanged (and the same set of participating threads must ar-
     rive at the
	synchronization point in the next cycle); otherwise the set of	partici-
     pating threads
	becomes  a  new  set with a size equal to the returned value N, and con-
     sists of the
	next N threads to arrive at the barrier's synchronization point.

	Users who do not need this functionality can use std::experimental::bar-
     rier.

Member functions
	constructor	constructs a flex_barrier
			(public member function)
	destructor	destroys the flex_barrier
			(public member function)
	operator=	not copy-assignable
	[deleted]	(public member function)
	arrive_and_wait arrive at the synchronization point and block
			(public member function)
			arrive at the synchronization point and remove the  cur-
     rent thread
	arrive_and_drop from the set of participating threads
			(public member function)

http://cppreference.com 	   2024.06.10	   std::experi...flex_barrier(3)

home | help