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. sealed trait CanAwait extends AnyRef

  3. trait Cancellable extends AnyRef

  4. type CancellationException = CancellationException

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

    This class .

  6. abstract class ConcurrentPackageObject extends AnyRef

    This package object contains primitives for concurrent and parallel programming.

  7. class DelayedLazyVal[T] extends AnyRef

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

  8. final class DurationOps extends AnyRef

  9. trait ExecutionContext extends AnyRef

  10. type ExecutionException = ExecutionException

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

    The trait that represents futures.

  12. class Lock extends AnyRef

    This class .

  13. trait ManagedBlocker extends AnyRef

    The ManagedBlocker trait.

  14. trait Promise[T] extends AnyRef

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

  15. trait Scheduler extends AnyRef

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

  16. class SyncChannel[A] extends AnyRef

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

  17. class SyncVar[A] extends AnyRef

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

  18. trait Task[+T] extends AnyRef

  19. class ThreadRunner extends FutureTaskRunner

    The ThreadRunner trait.

  20. type TimeoutException = TimeoutException

    Definition Classes
    package
  21. trait FutureTaskRunner extends TaskRunner

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

  22. trait TaskRunner extends AnyRef

    The TaskRunner trait.

  23. trait ThreadPoolRunner extends FutureTaskRunner

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

Value Members

  1. object Await extends AnyRef

  2. object ExecutionContext extends AnyRef

    Contains factory methods for creating execution contexts.

  3. object Future extends AnyRef

    Future companion object.

  4. object JavaConversions extends AnyRef

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

  5. object Promise extends AnyRef

  6. 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
  7. 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
  8. val currentExecutionContext: ThreadLocal[ExecutionContext]

    Definition Classes
    ConcurrentPackageObject
  9. lazy val defaultExecutionContext: ExecutionContext with Executor

    A global execution environment for executing lightweight tasks.

    A global execution environment for executing lightweight tasks.

    Definition Classes
    ConcurrentPackageObject
  10. def future[T](body: ⇒ T)(implicit execctx: ExecutionContext = defaultExecutionContext): 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
  11. val handledFutureException: PartialFunction[Throwable, Throwable]

    Definition Classes
    ConcurrentPackageObject
  12. package impl

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

    Definition Classes
    ConcurrentPackageObject
    Annotations
    @inline()
  14. def promise[T]()(implicit execctx: ExecutionContext = defaultExecutionContext): 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
  15. package util

Deprecated Value Members

  1. object TaskRunners extends AnyRef

    The TaskRunners object.

  2. object ops extends AnyRef

    The object ops .

Inherited from ConcurrentPackageObject

Inherited from AnyRef

Inherited from Any