Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

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

NAME
       std::experimental::flex_barrier::arrive_and_wait	   -   std::experimen-
       tal::flex_barrier::arrive_and_wait

Synopsis
	  void arrive_and_wait();  (concurrency	TS)

	  Blocks and arrives at	the flex_barrier's synchronization point.

	  The behavior is undefined if the calling thread is not in the	set of
       participating
	  threads of this flex_barrier.

	  Calls	to arrive_and_wait synchronizes	with the start of the  comple-
       tion 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.

Notes
	  It  is  safe	for  a	thread to call either arrive_and_wait()	or ar-
       rive_and_drop()
	  immediately on return	from this call (provided that the function ob-
       ject 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_barrier
	  was 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 value N, and consists of the next N threads to	arrive at  the
       synchronization
	  point. If N == 0, the	flex_barrier can only be destroyed.

	  The  initial	set  of	 participating threads for a flex_barrier con-
       structed	for
	  num_threads threads is the first num_threads to arrive at  its  syn-
       chronization point.

Exceptions
	  Throws nothing.

See also
			  arrive  at  the synchronization point	and remove the
       current thread
	  arrive_and_drop from the set of participating	threads
			  (public member function)

http://cppreference.com		  2022.07.31	  std::experi...ve_and_wait(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::flex_barrier::arrive_and_wait&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help