import kotlinx.klock.* fun main() { val lock = KReentrantLock() lock.lock() try { } finally { lock.unlock() } }