diff options
author | Philipp Haller <hallerp@gmail.com> | 2010-03-24 17:29:59 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2010-03-24 17:29:59 +0000 |
commit | 361799635196b1e2cc5dfdea569252cba3aa9ee1 (patch) | |
tree | c592b57463ef1079c85a4fd592a9b87f7f26a167 /test/files/jvm/actor-executor.scala | |
parent | a09cf5dbf7ed64e1ff52bebb53971d16304b58e5 (diff) | |
download | scala-361799635196b1e2cc5dfdea569252cba3aa9ee1.tar.gz scala-361799635196b1e2cc5dfdea569252cba3aa9ee1.tar.bz2 scala-361799635196b1e2cc5dfdea569252cba3aa9ee1.zip |
Addresses see #2017.
Diffstat (limited to 'test/files/jvm/actor-executor.scala')
-rw-r--r-- | test/files/jvm/actor-executor.scala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/files/jvm/actor-executor.scala b/test/files/jvm/actor-executor.scala index e650043382..435c666fff 100644 --- a/test/files/jvm/actor-executor.scala +++ b/test/files/jvm/actor-executor.scala @@ -47,9 +47,15 @@ object Test { val scheduler = new SchedulerAdapter { def execute(block: => Unit) { - executor.execute(new Runnable { + val task = new Runnable { def run() { block } - }) + } + try { + executor.execute(task) + } catch { + case ree: java.util.concurrent.RejectedExecutionException => + task.run() + } } } |