Semaphore.tryAcquire

Try to acquire resources from the semaphore.

Try to acquire one or more "resources" from the semaphore. To maintain strict FIFO, the acquire will fail if another request is currently pending, even if there are enough resources to satisfy both requests.

struct Semaphore
nothrow @safe @nogc
bool
tryAcquire
(
size_t amount = 1
)

Return Value

Type: bool

Returns true if the request was granted.

Meta