summaryrefslogtreecommitdiff
path: root/src/library/scala/concurrent/package.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/concurrent/package.scala')
-rw-r--r--src/library/scala/concurrent/package.scala22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/library/scala/concurrent/package.scala b/src/library/scala/concurrent/package.scala
index 50a66a622a..2fe14a9c1a 100644
--- a/src/library/scala/concurrent/package.scala
+++ b/src/library/scala/concurrent/package.scala
@@ -19,9 +19,9 @@ package object concurrent {
type TimeoutException = java.util.concurrent.TimeoutException
/** Starts an asynchronous computation and returns a `Future` object with the result of that computation.
- *
+ *
* The result becomes available once the asynchronous computation is completed.
- *
+ *
* @tparam T the type of the result
* @param body the asynchronous computation
* @param executor the execution context on which the future is run
@@ -30,7 +30,7 @@ package object concurrent {
def future[T](body: =>T)(implicit @deprecatedName('execctx) executor: ExecutionContext): Future[T] = Future[T](body)
/** Creates a promise object which can be completed with a value or an exception.
- *
+ *
* @tparam T the type of the value in the promise
* @return the newly created `Promise` object
*/
@@ -38,7 +38,7 @@ package object concurrent {
/** Used to designate a piece of code which potentially blocks, allowing the current [[BlockContext]] to adjust
* the runtime's behavior.
- * Properly marking blocking code may improve performance or avoid deadlocks.
+ * Properly marking blocking code may improve performance or avoid deadlocks.
*
* Blocking on an [[Awaitable]] should be done using [[Await.result]] instead of `blocking`.
*
@@ -53,22 +53,22 @@ package object concurrent {
package concurrent {
@implicitNotFound("Don't call `Awaitable` methods directly, use the `Await` object.")
sealed trait CanAwait
-
+
/**
* Internal usage only, implementation detail.
*/
private[concurrent] object AwaitPermission extends CanAwait
-
+
/**
* `Await` is what is used to ensure proper handling of blocking for `Awaitable` instances.
*/
object Await {
/**
* Await the "completed" state of an `Awaitable`.
- *
+ *
* Although this method is blocking, the internal use of [[scala.concurrent.blocking blocking]] ensures that
* the underlying [[ExecutionContext]] is prepared to properly manage the blocking.
- *
+ *
* @param awaitable
* the `Awaitable` to be awaited
* @param atMost
@@ -84,13 +84,13 @@ package concurrent {
@throws(classOf[InterruptedException])
def ready[T](awaitable: Awaitable[T], atMost: Duration): awaitable.type =
blocking(awaitable.ready(atMost)(AwaitPermission))
-
+
/**
* Await and return the result (of type `T`) of an `Awaitable`.
- *
+ *
* Although this method is blocking, the internal use of [[scala.concurrent.blocking blocking]] ensures that
* the underlying [[ExecutionContext]] to properly detect blocking and ensure that there are no deadlocks.
- *
+ *
* @param awaitable
* the `Awaitable` to be awaited
* @param atMost