diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-03-20 19:46:54 +0100 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-03-20 19:46:54 +0100 |
commit | 13a325b126ac6f2f5d2e7d1fc2c008d012367430 (patch) | |
tree | 7e0f42e6e87cf5e2d80aaac9c3623e23d5b9455e | |
parent | 1ba08472d6b3cf309211c6f912cc895e3a63fee0 (diff) | |
download | scala-13a325b126ac6f2f5d2e7d1fc2c008d012367430.tar.gz scala-13a325b126ac6f2f5d2e7d1fc2c008d012367430.tar.bz2 scala-13a325b126ac6f2f5d2e7d1fc2c008d012367430.zip |
Deprecate scala.parallel.Future and privatize a few classes.
4 files changed, 6 insertions, 3 deletions
diff --git a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala index 7984aa02b7..6201de14d7 100644 --- a/src/library/scala/concurrent/impl/ExecutionContextImpl.scala +++ b/src/library/scala/concurrent/impl/ExecutionContextImpl.scala @@ -18,7 +18,7 @@ import scala.collection.mutable.Stack -class ExecutionContextImpl(val executorService: AnyRef) extends ExecutionContext { +private[scala] class ExecutionContextImpl(val executorService: AnyRef) extends ExecutionContext { import ExecutionContextImpl._ def execute(runnable: Runnable): Unit = executorService match { diff --git a/src/library/scala/concurrent/impl/Future.scala b/src/library/scala/concurrent/impl/Future.scala index 9466761d4d..b4385ea34a 100644 --- a/src/library/scala/concurrent/impl/Future.scala +++ b/src/library/scala/concurrent/impl/Future.scala @@ -12,7 +12,7 @@ import scala.concurrent.{Awaitable, ExecutionContext} import scala.util.{ Try, Success, Failure } //import scala.util.continuations._ -trait Future[+T] extends scala.concurrent.Future[T] with Awaitable[T] { +private[concurrent] trait Future[+T] extends scala.concurrent.Future[T] with Awaitable[T] { implicit def executor: ExecutionContextImpl diff --git a/src/library/scala/concurrent/impl/Promise.scala b/src/library/scala/concurrent/impl/Promise.scala index 0087b71ea8..5238bc51db 100644 --- a/src/library/scala/concurrent/impl/Promise.scala +++ b/src/library/scala/concurrent/impl/Promise.scala @@ -22,7 +22,7 @@ import scala.annotation.tailrec -trait Promise[T] extends scala.concurrent.Promise[T] with Future[T] { +private[concurrent] trait Promise[T] extends scala.concurrent.Promise[T] with Future[T] { def future = this diff --git a/src/library/scala/parallel/Future.scala b/src/library/scala/parallel/Future.scala index af06852b32..f61d376093 100644 --- a/src/library/scala/parallel/Future.scala +++ b/src/library/scala/parallel/Future.scala @@ -8,11 +8,14 @@ package scala.parallel + + /** A future is a function without parameters that will block the caller if * the parallel computation associated with the function is not completed. * * @since 2.9 */ +@deprecated("Use `scala.concurrent.Future` instead.", "2.10.0") trait Future[@specialized +R] extends (() => R) { /** Returns a result once the parallel computation completes. If the * computation produced an exception, an exception is forwarded. |