Takes the mutex, waiting until no other thread holds it. Pair every lock with an unlock.
lock :: (m: *Mutex)
Parameters
- m: *Mutex
lock :: (m: *Mutex)
Takes the mutex, waiting until no other thread holds it. Pair every lock with an unlock.
Parameters
- m: *Mutex
mutex: Mutex;
init(*mutex);
defer destroy(*mutex);
lock(*mutex);
defer unlock(*mutex);