A non-blocking synchronization primitive that can be used for mutual exclusion across contexts.
Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to guarantee that acquiring a lock is first-come, first serve.
Acquires a lock on the mutex.
Coroutine: Calls to this function must be preceded with
yield within another coroutine or wrapped with
new Coroutine() to create an awaitable.
- Lock object which can be used to release the acquired.