-
Notifications
You must be signed in to change notification settings - Fork 8
timed_semaphore try_acquire
Alairion edited this page May 8, 2021
·
2 revisions
nes::timed_semaphore::try_acquire
(1) bool try_acquire();- Checks if a resource is available, and if that is the case decrements the resource counter.
None.
- Returns
trueif a resource was successfully acquired, otherwise returnsfalse.
- May throw an exception depending on the implementation behaviour.
- On Windows, calls
WaitForSingleObjectwith a timeout of 0ms
On Posix systems, callssem_trywait