synchronized (original) (raw)
kotlin-stdlib/kotlin/synchronized
inline fun <R> synchronized(lock: Any, block: () -> R): R(source)
Deprecated
Warning since 1.6
Error since 1.9
Hidden since 2.1
Synchronization on any object is not supported in Kotlin/JS
Replace with
run(block)
Content copied to clipboard
Since Kotlin
1.1
inline fun <R> synchronized(lock: Any, block: () -> R): R(source)
Executes the given function block while holding the monitor of the given object lock.
Since Kotlin
1.0
Thanks for your feedback!
Was this page helpful?