Packages

c

scala.collection.parallel

ExecutionContextTaskSupport

class ExecutionContextTaskSupport extends TaskSupport with ExecutionContextTasks

A task support that uses an execution context to schedule tasks.

It can be used with the default execution context implementation in the scala.concurrent package. It internally forwards the call to either a forkjoin based task support or a thread pool executor one, depending on what the execution context uses.

By default, parallel collections are parameterized with this task support object, so parallel collections share the same execution context backend as the rest of the scala.concurrent package.

Source
TaskSupport.scala
See also

scala.collection.parallel.TaskSupport for more information.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExecutionContextTaskSupport
  2. ExecutionContextTasks
  3. TaskSupport
  4. Tasks
  5. AnyRef
  6. Any
Implicitly
  1. by CollectionsHaveToParArray
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExecutionContextTaskSupport(environment: ExecutionContext = ...)

Type Members

  1. trait WrappedTask[R, +Tp] extends AnyRef
    Definition Classes
    Tasks

Value Members

  1. val environment: ExecutionContext

    The type of the environment is more specific in the implementations.

    The type of the environment is more specific in the implementations.

    Definition Classes
    ExecutionContextTaskSupportExecutionContextTasksTasks
  2. def execute[R, Tp](task: Task[R, Tp]): () ⇒ R

    Executes a task and returns a future.

    Executes a task and returns a future. Forwards an exception if some task threw it.

    Definition Classes
    ExecutionContextTasksTasks
  3. def executeAndWaitResult[R, Tp](task: Task[R, Tp]): R

    Executes a result task, waits for it to finish, then returns its result.

    Executes a result task, waits for it to finish, then returns its result. Forwards an exception if some task threw it.

    Definition Classes
    ExecutionContextTasksTasks
  4. def executionContext: ExecutionContext
    Definition Classes
    ExecutionContextTasks
  5. def parallelismLevel: Int

    Retrieves the parallelism level of the task execution environment.

    Retrieves the parallelism level of the task execution environment.

    Definition Classes
    ExecutionContextTasksTasks
  6. def toParArray: ParArray[T]
    Implicit
    This member is added by an implicit conversion from ExecutionContextTaskSupport to CollectionsHaveToParArray[ExecutionContextTaskSupport, T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type (ExecutionContextTaskSupport) ⇒ GenTraversableOnce[T] is in scope.
    Definition Classes
    CollectionsHaveToParArray