Scala, Concurrency, API, Project Loom, Java.
can be quite trivially used to implement a timeout method, for example: // In Ox.scala def timeout[T](duration: FiniteDuration)(t: => T): T = raceSuccess(Right(t))({ Thread.sleep(duration.toMillis) Left(()) }) match case Left(_) => throw new TimeoutException(s"Timed out after $duration") case