diff options
author | Philipp Haller <hallerp@gmail.com> | 2011-03-24 14:19:35 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2011-03-24 14:19:35 +0000 |
commit | af011572ee74162202b2a66a98bf5e480b5b435b (patch) | |
tree | 71960b5d5398d5df8cb9352019d01d95b495fa9a /src/library | |
parent | 84b0acd214f32e0a3d52e1c1be9fee5c96c69a07 (diff) | |
download | scala-af011572ee74162202b2a66a98bf5e480b5b435b.tar.gz scala-af011572ee74162202b2a66a98bf5e480b5b435b.tar.bz2 scala-af011572ee74162202b2a66a98bf5e480b5b435b.zip |
Added implicit TaskRunner parameters to scala.c...
Added implicit TaskRunner parameters to scala.concurrent.ops.{par, replicate}. Review by prokopec.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/concurrent/ops.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/concurrent/ops.scala b/src/library/scala/concurrent/ops.scala index 06f745e26b..5542472ce1 100644 --- a/src/library/scala/concurrent/ops.scala +++ b/src/library/scala/concurrent/ops.scala @@ -57,7 +57,7 @@ object ops * * @return a pair holding the evaluation results */ - def par[A, B](xp: => A, yp: => B): (A, B) = { + def par[A, B](xp: => A, yp: => B)(implicit runner: TaskRunner = defaultRunner): (A, B) = { val y = new SyncVar[Either[Throwable, B]] spawn { y set tryCatch(yp) } (xp, getOrThrow(y.get)) @@ -69,7 +69,7 @@ object ops * @param p ... */ @deprecated("use `collection.parallel.ParIterable.foreach' instead") - def replicate(start: Int, end: Int)(p: Int => Unit) { + def replicate(start: Int, end: Int)(p: Int => Unit)(implicit runner: TaskRunner = defaultRunner) { if (start == end) () else if (start + 1 == end) |