[#BloombergLP-bslmt-Barrier-2constructor-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Barrier.adoc[Barrier]::Barrier
:relfileprefix: ../../../
:mrdocs:

Create a barrier that requires the specified `numArrivals` to unblock, using the monotonic clock&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;barrier&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
Barrier(
    int numArrivals,
    std::chrono::steady&lowbar;clock const& steadyClock);
----

== Description

Use the monotonic system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see &lcub;Supported Clock&hyphen;Types&rcub; in the component&hyphen;level documentation)&period; The behavior is undefined unless `0 &lt; numArrivals`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *numArrivals*
| number of arrivals required to unblock the barrier
| *steadyClock*
| tag selecting the system monotonic clock
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
