jvmMain.com.squareup.sqldelight.internal.FunctionsJvm.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-jvm Show documentation
Show all versions of runtime-jvm Show documentation
Multiplatform runtime library to support generated code
package com.squareup.sqldelight.internal
import com.squareup.sqldelight.Query
import java.util.concurrent.CopyOnWriteArrayList
actual fun copyOnWriteList(): MutableList> {
return CopyOnWriteArrayList()
}
internal actual class QueryLock
internal actual inline fun QueryLock.withLock(block: () -> T): T {
synchronized(this) {
return block()
}
}
internal actual fun threadLocalRef(value: T): () -> T {
val threadLocal = ThreadLocal()
threadLocal.set(value)
return { threadLocal.get() }
}
internal actual fun sharedSet(): MutableSet = mutableSetOf()
internal actual fun sharedMap(): MutableMap = mutableMapOf()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy