v0.3.2-SNAPSHOT: added android-specific code and implementation, including defaultNamedStorage()

This commit is contained in:
sergeych committed 2025-12-15 08:39:25 +01:00
1 parent 1a46c8cab3
commit 972b033be1
7 files changed
+169 -3

No files matched your search

@@ -0,0 +1,17 @@
package net.sergeych.synctools
import java.util.concurrent.locks.ReentrantLock
/**
* Android actual implementation mirrors JVM using [ReentrantLock].
*/
actual fun ProtectedOp(): ProtectedOpImplementation = object : ProtectedOpImplementation {
private val access = ReentrantLock()
override fun lock() {
access.lock()
}
override fun unlock() {
access.unlock()
}
}