Locks the mutex. Blocks current coroutine if the mutex is locked by another coroutine. Throws if a coroutine tries to lock a mutex which is already locked by the current coroutine.
Note
The method waits for the mutex even if the current task is cancelled.
Tries to lock the mutex in specified duration. Blocks current coroutine if the mutex is locked by another coroutine up to the provided duration. Throws if a coroutine tries to lock a mutex which is already locked by the current coroutine.
Returns
true if the locking succeeded
Note
The method waits for the mutex even if the current task is cancelled.
Tries to lock the mutex till specified time point. Blocks current coroutine if the mutex is locked by another coroutine up to the provided time point. Throws if a coroutine tries to lock a mutex which is already locked by the current coroutine.
Returns
true if the locking succeeded
Note
The method waits for the mutex even if the current task is cancelled.