diff options
author | phaller <hallerp@gmail.com> | 2012-07-18 01:31:08 +0200 |
---|---|---|
committer | phaller <hallerp@gmail.com> | 2012-07-18 01:43:04 +0200 |
commit | 1c2efb36c2154f4f3480e674b87c57042be65d05 (patch) | |
tree | 7fdea8b39097e58929b9d4e40fbef9faeaa60f71 /src/library/scala/concurrent/Future.scala | |
parent | 4f07a12b3f4ce1595d4976123e5cfe34e186d4ba (diff) | |
download | scala-1c2efb36c2154f4f3480e674b87c57042be65d05.tar.gz scala-1c2efb36c2154f4f3480e674b87c57042be65d05.tar.bz2 scala-1c2efb36c2154f4f3480e674b87c57042be65d05.zip |
SI-6095, SI-6098 - clean up public API, add deprecations
Remove Scheduler, Cancellable, and Task trait.
Hide impl.Promise object.
Deprecate managedBlock methods in TaskRunners.
Remove duplicate toBoxed method and pointless renaming import.
Remove duplicate import of CanBuildFrom and Builder in Future.
Organize imports in impl.Promise.
Review by @axel22 and @heathermiller
Diffstat (limited to 'src/library/scala/concurrent/Future.scala')
-rw-r--r-- | src/library/scala/concurrent/Future.scala | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/library/scala/concurrent/Future.scala b/src/library/scala/concurrent/Future.scala index e556be4fe3..f82b79cb18 100644 --- a/src/library/scala/concurrent/Future.scala +++ b/src/library/scala/concurrent/Future.scala @@ -14,7 +14,6 @@ import java.util.concurrent.{ ConcurrentLinkedQueue, TimeUnit, Callable } import java.util.concurrent.TimeUnit.{ NANOSECONDS => NANOS, MILLISECONDS ⇒ MILLIS } import java.lang.{ Iterable => JIterable } import java.util.{ LinkedList => JLinkedList } -import java.{ lang => jl } import java.util.concurrent.atomic.{ AtomicReferenceFieldUpdater, AtomicInteger, AtomicBoolean } import scala.concurrent.util.Duration @@ -565,17 +564,15 @@ trait Future[+T] extends Awaitable[T] { */ object Future { - import java.{ lang => jl } - private[concurrent] val toBoxed = Map[Class[_], Class[_]]( - classOf[Boolean] -> classOf[jl.Boolean], - classOf[Byte] -> classOf[jl.Byte], - classOf[Char] -> classOf[jl.Character], - classOf[Short] -> classOf[jl.Short], - classOf[Int] -> classOf[jl.Integer], - classOf[Long] -> classOf[jl.Long], - classOf[Float] -> classOf[jl.Float], - classOf[Double] -> classOf[jl.Double], + classOf[Boolean] -> classOf[java.lang.Boolean], + classOf[Byte] -> classOf[java.lang.Byte], + classOf[Char] -> classOf[java.lang.Character], + classOf[Short] -> classOf[java.lang.Short], + classOf[Int] -> classOf[java.lang.Integer], + classOf[Long] -> classOf[java.lang.Long], + classOf[Float] -> classOf[java.lang.Float], + classOf[Double] -> classOf[java.lang.Double], classOf[Unit] -> classOf[scala.runtime.BoxedUnit] ) @@ -604,9 +601,6 @@ object Future { */ def apply[T](body: =>T)(implicit execctx: ExecutionContext): Future[T] = impl.Future(body) - import scala.collection.mutable.Builder - import scala.collection.generic.CanBuildFrom - /** Simple version of `Futures.traverse`. Transforms a `TraversableOnce[Future[A]]` into a `Future[TraversableOnce[A]]`. * Useful for reducing many `Future`s into a single `Future`. */ |