BloombergLP::bslmt::FastPostSemaphore::postWithRedundantSignal

Atomically increase the count of this semaphore by the specified value.

Synopsis

Declared in <bslmt_fastpostsemaphore.h>

void
postWithRedundantSignal(
    int value,
    int available,
    int blocked);

Description

If the resources available to this semaphore is greater than or equal to the specified available and the number of threads blocked in this semaphore is greater than or equal to the specified blocked, always send a signal to potentially wake a waiting thread (even if the signal should not be needed). The behavior is undefined unless value > 0. Note that this method is provided to help mitigate issues in the implementation of underlying synchronization primitives.

Parameters

NameDescription
valueamount by which to increase the semaphore count
availableavailable-resource threshold that forces a signal
blockedblocked-thread threshold that forces a signal