An object that may eventually be completed with a result value of type T
which may be
awaited using blocking methods.
A context to be notified by scala.concurrent.blocking
when
a thread is about to block.
This class .
A DelayedLazyVal
is a wrapper for lengthy computations which have a
valid partially computed result.
An ExecutionContext
can execute program logic, typically but not
necessarily on a thread pool.
Union interface since Java does not support union types
Union interface since Java does not support union types
The trait that represents futures.
This class .
A marker indicating that a java.lang.Runnable
provided to scala.concurrent.ExecutionContext
wraps a callback provided to Future.onComplete
.
Promise is an object which can be completed with a value or failed with an exception.
A SyncChannel
allows one to exchange data synchronously between
a reader and a writer thread.
A class to provide safe concurrent access to a mutable cell.
Await
is what is used to ensure proper handling of blocking for Awaitable
instances.
Contains factory methods for creating execution contexts.
Future companion object.
The JavaConversions
object provides implicit converstions supporting
interoperability between Scala and Java concurrency classes.
Used to designate a piece of code which potentially blocks, allowing the current BlockContext to adjust the runtime's behavior.
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.
Blocking on an Awaitable should be done using Await.result instead of blocking
.
A piece of code which contains potentially blocking or long running calls.
if the computation was cancelled
`InterruptedException`in the case that a wait within the blocking body
was interrupted
Starts an asynchronous computation and returns a Future
object with the result of that computation.
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.
the type of the result
the asynchronous computation
the execution context on which the future is run
the Future
holding the result of the computation
(Since version 2.11.0) Use Future { ... }
instead.
Creates a promise object which can be completed with a value or an exception.
Creates a promise object which can be completed with a value or an exception.
the type of the value in the promise
the newly created Promise
object
(Since version 2.11.0) Use Promise[T]()
instead.
This package object contains primitives for concurrent and parallel programming.