initial commit (moved from divan)
This commit is contained in:
commit
770555024f
56 files changed
+2745
No files matched your search
@@ -0,0 +1,8 @@
|
||||
package net.sergeych.tools
|
||||
|
||||
actual fun ProtectedOp(): ProtectedOpImplementation = object : ProtectedOpImplementation {
|
||||
private val lock = Object()
|
||||
override fun <T> invoke(f: () -> T): T {
|
||||
synchronized(lock) { return f() }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user