scala

concurrent

package concurrent

This package object contains primitives for concurrent and parallel programming.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. concurrent
  2. ConcurrentPackageObject
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Awaitable[+T] extends AnyRef

  2. trait BlockContext extends AnyRef

    A context to be notified by scala.concurrent.blocking() when a thread is about to block.

  3. sealed trait CanAwait extends AnyRef

  4. trait Cancellable extends AnyRef

  5. type CancellationException = CancellationException

    Definition Classes
    package
  6. class Channel[A] extends AnyRef

    This class .

  7. abstract class ConcurrentPackageObject extends AnyRef

    This package object contains primitives for concurrent and parallel programming.

  8. class DelayedLazyVal[T] extends AnyRef

    A DelayedLazyVal is a wrapper for lengthy computations which have a valid partially computed result.

  9. final class DurationOps extends AnyRef

  10. trait ExecutionContext extends AnyRef

    An ExecutionContext is an abstraction over an entity that can execute program logic.

  11. trait ExecutionContextExecutor extends ExecutionContext with Executor

    Union interface since Java does not support union types

  12. trait ExecutionContextExecutorService extends ExecutionContextExecutor with ExecutorService

    Union interface since Java does not support union types

  13. type ExecutionException = ExecutionException

    Definition Classes
    package
  14. trait Future[+T] extends Awaitable[T]

    The trait that represents futures.

  15. class Lock extends AnyRef

    This class .

  16. trait ManagedBlocker extends AnyRef

    The ManagedBlocker trait.

  17. trait OnCompleteRunnable extends AnyRef

    A marker indicating that a java.lang.Runnable provided to scala.concurrent.ExecutionContext wraps a callback provided to Future.onComplete.

  18. trait Promise[T] extends AnyRef

    Promise is an object which can be completed with a value or failed with an exception.

  19. trait Scheduler extends AnyRef

    A service for scheduling tasks and thunks for one-time, or periodic execution.

  20. class SyncChannel[A] extends AnyRef

    A SyncChannel allows one to exchange data synchronously between a reader and a writer thread.

  21. class SyncVar[A] extends AnyRef

    A class to provide safe concurrent access to a mutable cell.

  22. trait Task[+T] extends AnyRef

  23. class ThreadRunner extends FutureTaskRunner

    The ThreadRunner trait.

  24. type TimeoutException = TimeoutException

    Definition Classes
    package
  25. trait FutureTaskRunner extends TaskRunner

    The FutureTaskRunner trait is a base trait of task runners that provide some sort of future abstraction.

  26. trait TaskRunner extends AnyRef

    The TaskRunner trait.

  27. trait ThreadPoolRunner extends FutureTaskRunner

    The ThreadPoolRunner trait uses a java.util.concurrent.ExecutorService to run submitted tasks.

Value Members

  1. object Await

  2. object BlockContext

  3. object ExecutionContext

    Contains factory methods for creating execution contexts.

  4. object Future

    Future companion object.

  5. object JavaConversions

    The JavaConversions object provides implicit converstions supporting interoperability between Scala and Java concurrency classes.

  6. object Promise

  7. def blocking[T](awaitable: Awaitable[T], atMost: Duration): T

    Blocks on an awaitable object.

    Blocks on an awaitable object.

    awaitable

    An object with a block method which runs potentially blocking or long running calls.

    Calling this method may throw the following exceptions:

    • CancellationException - if the computation was cancelled
    • InterruptedException - in the case that a wait within the blockable object was interrupted
    • TimeoutException - in the case that the blockable object timed out
    Definition Classes
    ConcurrentPackageObject
  8. def blocking[T](body: ⇒ T): T

    Used to block on a piece of code which potentially blocks.

    Used to block on a piece of code which potentially blocks.

    body

    A piece of code which contains potentially blocking or long running calls.

    Calling this method may throw the following exceptions:

    • CancellationException - if the computation was cancelled
    • InterruptedException - in the case that a wait within the blockable object was interrupted
    • TimeoutException - in the case that the blockable object timed out
    Definition Classes
    ConcurrentPackageObject
  9. def future[T](body: ⇒ T)(implicit execctx: ExecutionContext): Future[T]

    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.

    T

    the type of the result

    body

    the asychronous computation

    execctx

    the execution context on which the future is run

    returns

    the Future holding the result of the computation

    Definition Classes
    ConcurrentPackageObject
  10. package impl

  11. implicit final def int2durationops(x: Int): DurationOps

    Definition Classes
    ConcurrentPackageObject
    Annotations
    @inline()
  12. def promise[T]()(implicit execctx: ExecutionContext): Promise[T]

    Creates a promise object which can be completed with a value.

    Creates a promise object which can be completed with a value.

    T

    the type of the value in the promise

    execctx

    the execution context on which the promise is created on

    returns

    the newly created Promise object

    Definition Classes
    ConcurrentPackageObject
  13. package util

Deprecated Value Members

  1. object TaskRunners

    The TaskRunners object.

  2. object ops

    The object ops .

Inherited from ConcurrentPackageObject

Inherited from AnyRef

Inherited from Any