Merge pull request #884 from akka/wip-2729-√

#2729 - Removing uses of Future.either in favor of firstCompletedOf
This commit is contained in:
Viktor Klang (√) 2012-11-26 05:52:16 -08:00
commit 33a8297e0f
2 changed files with 3 additions and 3 deletions

View file

@ -417,7 +417,7 @@ class FutureDocSpec extends AkkaSpec {
val delayed = after(200 millis, using = system.scheduler)(Future.failed(
new IllegalStateException("OHNOES")))
val future = Future { Thread.sleep(1000); "foo" }
val result = future either delayed
val result = Future firstCompletedOf Seq(future, delayed)
//#after
intercept[IllegalStateException] { Await.result(result, 2 second) }
}