BloombergLP::bslmt::FastPostSemaphore::wait

Block until this semaphore's count is positive, then decrement it.

Synopsis

Declared in <bslmt_fastpostsemaphore.h>

int
wait();

Description

If this semaphore is initially disabled, or becomes disabled while blocking, return e_DISABLED with no effect on the count. Otherwise, block until the count of this semaphore is a positive value, return 0 and atomically decrement the count. Return e_FAILED if an error occurs.

Return Value

0 on success, e_DISABLED if disabled, or e_FAILED on error