-
Notifications
You must be signed in to change notification settings - Fork 7
timed_named_mutex try_lock
Alairion edited this page May 8, 2021
·
2 revisions
nes::timed_named_mutex::try_lock
(1) bool try_lock();
- Tries to lock the mutex. If it is already owned by another thread, this function still returns immediately.
None.
- Returns
true
if the mutex was acquired,false
otherwise.
- The calling thread must not own the mutex.
- Throws a
std::runtime_error
if the lock operation fails.
- On Windows, calls
WaitForSingleObject
with a timeout of 0ms
On Posix systems, callspthread_mutex_trylock