Returns true
if the mutex is locked
Tries to lock the mutex or returns false if it is already locked. The thread execution is not paused.
var writeMutex = Mutex('writeMutex');
writeMutex.tryToLock();
Returns true
if the mutex is locked, false
otherwise
Unlock the mutex. The mutex must be lock in the same thread to be unlock.
var writeMutex = Mutex('writeMutex');
writeMutex.lock();
writeMutex.unlock();
Returns true
if the mutex is unlocked, false
otherwise
Locks the mutex or wait until it has been released to lock it; the thread execution is paused until then.
var writeMutex = Mutex('writeMutex'); writeMutex.lock();