onLock

abstract val onLock: SelectClause2<Any?, Mutex> (source)

Clause for select expression of lock suspending function that selects when the mutex is locked. Additional parameter for the clause in the owner (see lock) and when the clause is selected the reference to this mutex is passed into the corresponding block.