withLock

inline suspend fun <K, T> KeyedMutex<K>.withLock(key: K, owner: Any? = null, action: suspend () -> T): T(source)

Convenience function mirroring Mutex.withLock