Scala, Concurrency, API, Project Loom, Java.
Right(v) => v // In OxTest.scala "timeout" should "short-circuit a long computation" in { val trail = Trail() scoped { try timeout(1.second) { Thread.sleep(2000) trail.add("no timeout") } catch case _: TimeoutException => trail.add("timeout") trail.add("done") Thread.sleep(2000) } trail.trail