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

zio.test.TestDebugFileLock.scala Maven / Gradle / Ivy

There is a newer version: 2.1.14
Show newest version
package zio.test

import zio.{Ref, ZIO}

private[test] object TestDebugFileLock {
  def make: ZIO[Any, Nothing, TestDebugFileLock] =
    Ref.Synchronized.make[Unit](()).map(TestDebugFileLock(_))
}

private[test] case class TestDebugFileLock(lock: Ref.Synchronized[Unit]) {
  def updateFile(action: ZIO[Any, Nothing, Unit]) =
    lock.updateZIO(_ => action)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy