holdsLock

suspend fun holdsLock(key: K, owner: Any): Boolean(source)

Checks whether this key is locked by the specified owner.