diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-12-21 16:03:07 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-12-21 16:03:07 +0000 |
commit | 348fd6e69ae96b5d8187e1f25372c0908a5ce218 (patch) | |
tree | 1410e97d31e73632ddfc67728fdc16c231e64ed5 /src | |
parent | 27f2d87d886d302282bf12e30ebc271074ebef52 (diff) | |
download | scala-348fd6e69ae96b5d8187e1f25372c0908a5ce218.tar.gz scala-348fd6e69ae96b5d8187e1f25372c0908a5ce218.tar.bz2 scala-348fd6e69ae96b5d8187e1f25372c0908a5ce218.zip |
closed #2829. review by rompf.
Diffstat (limited to 'src')
-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 { |