scala

concurrent

package concurrent

This package object contains primitives for concurrent and parallel programming.

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 FutureTimeoutException extends TimeoutException

    A timeout exception.

  13. class Lock extends AnyRef

    This class .

  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 ManagedBlocker extends AnyRef

    The ManagedBlocker trait.

  23. trait TaskRunner extends AnyRef

    The TaskRunner trait.

  24. trait ThreadPoolRunner extends FutureTaskRunner

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

Value Members

  1. object Future extends AnyRef

    TODO some docs

  2. object JavaConversions extends AnyRef

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

  3. object Promise extends AnyRef

  4. object await extends AnyRef

  5. def blocking[T](awaitable: Awaitable[T], atMost: Duration)(implicit execCtx: ExecutionContext = executionContext): 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
  6. def blocking[T](atMost: Duration)(body: ⇒ T)(implicit execCtx: ExecutionContext): 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
  7. def body2awaitable[T](body: ⇒ T): Awaitable[T]

    Wraps a block of code into an awaitable object.

    Wraps a block of code into an awaitable object.

    Definition Classes
    ConcurrentPackageObject
  8. lazy val executionContext: ExecutionContextImpl

    A global execution environment for executing lightweight tasks.

    A global execution environment for executing lightweight tasks.

    Definition Classes
    ConcurrentPackageObject
  9. def future[T](body: ⇒ T)(implicit execCtx: ExecutionContext = executionContext): Future[T]

    Definition Classes
    ConcurrentPackageObject
  10. val handledFutureException: PartialFunction[Throwable, Throwable]

    A global service for scheduling tasks for execution.

    A global service for scheduling tasks for execution.

    Definition Classes
    ConcurrentPackageObject
  11. package impl

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

    Definition Classes
    ConcurrentPackageObject
    Annotations
    @inline()
  13. object nondeterministic extends AnyRef

    Importing this object allows using some concurrency primitives on futures and promises that can yield nondeterministic programs.

  14. def promise[T]()(implicit execCtx: ExecutionContext = executionContext): Promise[T]

    Definition Classes
    ConcurrentPackageObject

Deprecated Value Members

  1. object TaskRunners extends AnyRef

    The TaskRunners object.

  2. object ops extends AnyRef

    The object ops .