diff options
author | Martin Odersky <odersky@gmail.com> | 2010-07-19 13:56:03 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-07-19 13:56:03 +0000 |
commit | 9c365348fd4e0e40b6499f2abf1b1057735296f6 (patch) | |
tree | f41c23a921c28c916eee665194b1542e59514d6a /src/compiler/scala/tools/nsc/interactive/CompilerControl.scala | |
parent | a6bb10a310b2d10cfd2713b9d8ca5c21af73902d (diff) | |
download | scala-9c365348fd4e0e40b6499f2abf1b1057735296f6.tar.gz scala-9c365348fd4e0e40b6499f2abf1b1057735296f6.tar.bz2 scala-9c365348fd4e0e40b6499f2abf1b1057735296f6.zip |
Added `ask` method to compiler control to do fa...
Added `ask` method to compiler control to do fast trunaround
computations on presentation compiler thread.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interactive/CompilerControl.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/CompilerControl.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala index 26f7fb1115..c6106a9865 100644 --- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala @@ -134,6 +134,9 @@ trait CompilerControl { self: Global => /** Tell the compile server to shutdown, and do not restart again */ def askShutdown() = scheduler raise ShutdownReq + /** Ask for a computation to be done quickly on the presentation compiler thread */ + def ask[A](op: () => A): A = scheduler doQuickly op + // ---------------- Interpreted exceptions ------------------- object CancelActionReq extends ControlThrowable |