Skip to content

Commit a4053e2

Browse files
committed
chore: explanation why runSynchronized does nothing on JS
1 parent e43f986 commit a4053e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kotlin-utils/src/jsMain/kotlin/org/modelix/kotlin/utils/RunSynchronized.js.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
package org.modelix.kotlin.utils
1818

1919
actual inline fun <R> runSynchronized(lock: Any, block: () -> R): R {
20+
// This method is only required when compiling to the JVM. JS is single-threaded.
2021
return block()
2122
}

0 commit comments

Comments
 (0)