All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.com.squareup.sqldelight.internal.FunctionsJvm.kt Maven / Gradle / Ivy

There is a newer version: 1.5.5
Show newest version
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