-
Notifications
You must be signed in to change notification settings - Fork 7
semaphore try_acquire
Alairion edited this page May 8, 2021
·
4 revisions
nes::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
true
if a resource was successfully acquired, otherwise returnsfalse
.
- May throw an exception depending on the implementation behaviour.
- On Windows, calls
WaitForSingleObject
with a timeout of 0ms
On Posix systems, callssem_trywait