more ios/macos targets implementation

This commit is contained in:
sergeych committed 2024-03-15 19:22:36 +01:00
1 parent 87a0c14b85
commit fa87a0f611
19 files changed
+475 -30

No files matched your search

@@ -0,0 +1,17 @@
package net.sergeych.synctools
import kotlinx.atomicfu.locks.ReentrantLock
/**
* Native implementation uses `ReentrantLock`]
*/
actual fun ProtectedOp(): ProtectedOpImplementation = object : ProtectedOpImplementation {
private val access = ReentrantLock()
override fun lock() {
access.lock()
}
override fun unlock() {
access.unlock()
}
}