lock

Acquires a lock on the mutex. If the lock is already acquired by another thread, then the subsequent callers of this method are blocked until the lock is released.

common
fun lock()
ios
fun lock()