nn::os::LightSemaphore::TryAcquire Member Function

Syntax

#include <nn/os.h>

bool TryAcquire();

bool TryAcquire(
     fnd::TimeSpan timeout
);

List of Overloaded Member Functions

TryAcquire( ) Tries to decrement the counter value by one.
TryAcquire(fnd::TimeSpan) Tries to decrement the counter value by one.

Description of TryAcquire( )

If the counter was already 0, this function returns without decrementing it.

Description of TryAcquire(fnd::TimeSpan)

If the counter was already 0, this function waits for it to become 1 or greater. The maximum wait time is specified by timeout.

If the timeout elapses and the counter has not become 1 or more, this function returns without decrementing the counter.


CONFIDENTIAL