diff options
Diffstat (limited to 'src/actors')
-rw-r--r-- | src/actors/scala/actors/Future.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/actors/scala/actors/Future.scala b/src/actors/scala/actors/Future.scala index ea0c3a691f..70bcde9380 100644 --- a/src/actors/scala/actors/Future.scala +++ b/src/actors/scala/actors/Future.scala @@ -110,12 +110,6 @@ object Futures { * is negative. */ def awaitAll(timeout: Long, fts: Future[Any]*): List[Option[Any]] = { - val thisActor = Actor.self - val timerTask = new java.util.TimerTask { - def run() { thisActor ! TIMEOUT } - } - Actor.timer.schedule(timerTask, timeout) - var resultsMap: collection.mutable.Map[Int, Option[Any]] = new collection.mutable.HashMap[Int, Option[Any]] var cnt = 0 @@ -135,6 +129,12 @@ object Futures { singleCase }) + val thisActor = Actor.self + val timerTask = new java.util.TimerTask { + def run() { thisActor ! TIMEOUT } + } + Actor.timer.schedule(timerTask, timeout) + def awaitWith(partFuns: Seq[PartialFunction[Any, Pair[Int, Any]]]) { val reaction: PartialFunction[Any, Unit] = new PartialFunction[Any, Unit] { def isDefinedAt(msg: Any) = msg match { |