nn::os::Mutex::TryLock Member Function#include <nn/os.h>
bool TryLock(
nn::fnd::TimeSpan timeout = 0
);
| Name | Description | |
|---|---|---|
| in | timeout | Specifies the timeout period. Specifying 0 will cause control to return immediately. |
Tries to lock a mutex.
Tries to lock a mutex and returns true if successful. If it could not lock the mutex, this function waits for at most the length of time specified by timeout and returns true if it gets a lock by then. Returns false if it cannot get a lock even after waiting for the time specified by timeout.
CONFIDENTIAL