diff options
author | Philipp Haller <hallerp@gmail.com> | 2009-05-24 14:15:40 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2009-05-24 14:15:40 +0000 |
commit | a1f098795934a4ccc8a3e72b779e47b911eae0f4 (patch) | |
tree | d077b5e5a7f8f221b86e61c024dc564da517f37c /src/actors | |
parent | 54a706f3f652778a3119926105bcd01920a4680f (diff) | |
download | scala-a1f098795934a4ccc8a3e72b779e47b911eae0f4.tar.gz scala-a1f098795934a4ccc8a3e72b779e47b911eae0f4.tar.bz2 scala-a1f098795934a4ccc8a3e72b779e47b911eae0f4.zip |
Fixed #1999.
Diffstat (limited to 'src/actors')
-rw-r--r-- | src/actors/scala/actors/Scheduler.scala | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/actors/scala/actors/Scheduler.scala b/src/actors/scala/actors/Scheduler.scala index 1d87c7a3c2..44371879a3 100644 --- a/src/actors/scala/actors/Scheduler.scala +++ b/src/actors/scala/actors/Scheduler.scala @@ -88,25 +88,11 @@ object Scheduler extends IScheduler { } def execute(task: Runnable) { - val t = currentThread - if (t.isInstanceOf[FJTaskRunner]) { - val tr = t.asInstanceOf[FJTaskRunner] - tr.push(new FJTask { - def run() { task.run() } - }) - } else - sched execute task + sched execute task } def execute(fun: => Unit) { - val t = currentThread - if (t.isInstanceOf[FJTaskRunner]) { - val tr = t.asInstanceOf[FJTaskRunner] - tr.push(new FJTask { - def run() { fun } - }) - } else - sched execute { fun } + sched execute { fun } } def shutdown() = sched.shutdown() |