diff options
author | Philipp Haller <hallerp@gmail.com> | 2008-09-29 09:28:09 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2008-09-29 09:28:09 +0000 |
commit | ee9e91a10702300bb2ab282ca36c9bebf43d62f1 (patch) | |
tree | 64a971d854afc99982a1958204efa55aa76bca73 /src/actors/scala/actors/Future.scala | |
parent | 184383a519ab637530899ffd446a30c919e4a991 (diff) | |
download | scala-ee9e91a10702300bb2ab282ca36c9bebf43d62f1.tar.gz scala-ee9e91a10702300bb2ab282ca36c9bebf43d62f1.tar.bz2 scala-ee9e91a10702300bb2ab282ca36c9bebf43d62f1.zip |
Replaced TimerThread with java.util.Timer.
Diffstat (limited to 'src/actors/scala/actors/Future.scala')
-rw-r--r-- | src/actors/scala/actors/Future.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/actors/scala/actors/Future.scala b/src/actors/scala/actors/Future.scala index d796c15dcd..9347131ad9 100644 --- a/src/actors/scala/actors/Future.scala +++ b/src/actors/scala/actors/Future.scala @@ -72,7 +72,10 @@ object Futures { * </p> */ def awaitAll(timeout: Long, fts: Future[Any]*): List[Option[Any]] = { - TimerThread.requestTimeout(Actor.self, null, timeout) + val thisActor = Actor.self + Actor.timer.schedule(new java.util.TimerTask { + def run() { thisActor ! TIMEOUT } + }, timeout) var resultsMap: collection.mutable.Map[Int, Option[Any]] = new collection.mutable.HashMap[Int, Option[Any]] |