[#BloombergLP-bslmt-Latch-2constructor-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Latch.adoc[Latch]::Latch :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bslmt_latch.h>` Create a latch that will synchronize on the specified `count` number of events, and when `count` events have been recorded will release any waiting threads. Optionally specify a `clockType` indicating the type of the system clock against which the `bsls::TimeInterval` `absTime` timeouts passed to the `timedWait` method are to be interpreted. If `clockType` is not specified then the realtime system clock is used. The behavior is undefined unless `0 <= count`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bslmt/Latch/2constructor-08.adoc[Latch]( int count, xref:BloombergLP/bsls/SystemClockType/Enum.adoc[bsls::SystemClockType::Enum] clockType = bsls::SystemClockType::e_REALTIME); ---- [.small]#xref:BloombergLP/bslmt/Latch/2constructor-08.adoc[_» more..._]# Create a latch that will synchronize on the specified `count` number of events, and when `count` events have been recorded will release any waiting threads. Use the monotonic system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). The behavior is undefined unless `0 <= count`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslmt/Latch/2constructor-01.adoc[Latch]( int count, std::chrono::steady_clock const&); ---- [.small]#xref:BloombergLP/bslmt/Latch/2constructor-01.adoc[_» more..._]# Create a latch that will synchronize on the specified `count` number of events, and when `count` events have been recorded will release any waiting threads. Use the realtime system clock as the clock against which the `absTime` timeouts passed to the `timedWait` methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). The behavior is undefined unless `0 <= count`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslmt/Latch/2constructor-06.adoc[Latch]( int count, std::chrono::system_clock const&); ---- [.small]#xref:BloombergLP/bslmt/Latch/2constructor-06.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#