GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::experimental::barrier(3) C++ Standard Libary std::experimental::barrier(3)

std::experimental::barrier - std::experimental::barrier


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


The class std::experimental::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 participating
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 participating
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.


For std::experimental::barrier, the completion phase is empty.
std::experimental::flex_barrier allows the user to control the completion phase with
a function object.


The set of participating threads for a barrier constructed for num_threads threads
is the first num_threads threads to arrive at its synchronization point after
construction. The same set of threads (except for threads that called
arrive_and_drop()) must arrive at the barrier each cycle.


constructor constructs a barrier
(public member function)
destructor destroys the 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 current thread
arrive_and_drop from the set of participating threads
(public member function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.