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

er.lm-coursier-shaded_2.12.2.1.5.source-code.Lock.scala Maven / Gradle / Ivy

The newest version!
package lmcoursier.internal

private[lmcoursier] object Lock {
  private val lock = new Object

  /* Progress bars require us to only work on one module at the time. Without those we can go faster */
  def maybeSynchronized[T](needsLock: Boolean)(f: => T): T =
    if (needsLock) lock.synchronized(f)
    else f
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy