nativeCommonMain.co.touchlab.stately.concurrency.Functions.kt Maven / Gradle / Ivy
package co.touchlab.stately.concurrency
actual open class Synchronizable(private val _lock: Lock) {
actual constructor() : this(Lock())
fun runSynchronized(block: () -> R): R = _lock.withLock(block)
}
actual inline fun Synchronizable.synchronize(noinline block: () -> R): R = runSynchronized(block)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy