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

kreuzberg.SimpleThreadLocal.scala Maven / Gradle / Ivy

There is a newer version: 0.10.3
Show newest version
package kreuzberg

private[kreuzberg] class SimpleThreadLocal[T](initial: T) {
  private val _val    = new ThreadLocal[T] {
    override def initialValue(): T = {
      initial
    }
  }
  inline def get(): T = _val.get()

  inline def set(value: T): Unit = _val.set(value)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy