diff options
author | Paul Phillips <paulp@improving.org> | 2009-08-21 02:51:52 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-08-21 02:51:52 +0000 |
commit | 832114b93349fa60b7c272c1c2189325bae49ca6 (patch) | |
tree | 41021c8842c03c57ebd508c8a44a8165976f0bf7 /src | |
parent | 9e3295514c3dae71b6f8195b617860e7d4b60237 (diff) | |
download | scala-832114b93349fa60b7c272c1c2189325bae49ca6.tar.gz scala-832114b93349fa60b7c272c1c2189325bae49ca6.tar.bz2 scala-832114b93349fa60b7c272c1c2189325bae49ca6.zip |
Gave spawn and future a default implicit to add...
Gave spawn and future a default implicit to address ticket #2274.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/InterpreterLoop.scala | 2 | ||||
-rw-r--r-- | src/library/scala/concurrent/ops.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala index 69db5c98b2..50ad59d38e 100644 --- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala +++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala @@ -55,7 +55,7 @@ object InterpreterControl { } import InterpreterControl._ -import scala.concurrent.ops.defaultRunner +// import scala.concurrent.ops.defaultRunner /** The * <a href="http://scala-lang.org/" target="_top">Scala</a> diff --git a/src/library/scala/concurrent/ops.scala b/src/library/scala/concurrent/ops.scala index f3be1475a7..3ce7de2465 100644 --- a/src/library/scala/concurrent/ops.scala +++ b/src/library/scala/concurrent/ops.scala @@ -39,7 +39,7 @@ object ops { * * @param p the expression to evaluate */ - def spawn(p: => Unit)(implicit runner: TaskRunner[Unit]): Unit = { + def spawn(p: => Unit)(implicit runner: TaskRunner[Unit] = defaultRunner): Unit = { runner submit (() => p) } @@ -47,7 +47,7 @@ object ops { * @param p ... * @return ... */ - def future[A](p: => A)(implicit runner: TaskRunner[Unit]): () => A = { + def future[A](p: => A)(implicit runner: TaskRunner[Unit] = defaultRunner): () => A = { val result = new SyncVar[Either[A, Throwable]] spawn({ result set tryCatch(p) })(runner) () => result.get match { |