0.1.1-SNAPSHOT: storages, sync tools, docs
This commit is contained in:
1 parent
3e6c487601
commit
babc3933eb
24 files changed
+925
-52
No files matched your search
@@ -0,0 +1,9 @@
|
||||
package net.sergeych.tools
|
||||
|
||||
/**
|
||||
* JS is single-threaded, so we don't need any additional protection:
|
||||
*/
|
||||
actual fun ProtectedOp(): ProtectedOpImplementation = object : ProtectedOpImplementation {
|
||||
override fun lock() {}
|
||||
override fun unlock() {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package net.sergeych.synctools
|
||||
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
actual class WaitHandle {
|
||||
actual fun await(milliseconds: Long): Boolean {
|
||||
// in JS we can't wait: no threads
|
||||
return true
|
||||
}
|
||||
|
||||
actual fun wakeUp() {
|
||||
// in JS we can't wait: no threads
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user