ExecutionContextTasks

scala.collection.parallel.ExecutionContextTasks

This tasks implementation uses execution contexts to spawn a parallel computation.

As an optimization, it internally checks whether the execution context is the standard implementation based on fork/join pools, and if it is, creates a ForkJoinTaskSupport that shares the same pool to forward its request to it.

Otherwise, it uses an execution context exclusive Tasks implementation to divide the tasks into smaller chunks and execute operations on it.

Attributes

Graph
Supertypes
trait Tasks
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Inherited classlikes

trait WrappedTask[R, +Tp]

Attributes

Inherited from:
Tasks
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait AWSTWrappedTask[R, Tp]
class AWSFJTWrappedTask[R, Tp]
trait FJTWrappedTask[R, Tp]

Value members

Concrete methods

def execute[R, Tp](task: Task[R, Tp]): () => R

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

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

Attributes

def executeAndWaitResult[R, Tp](task: Task[R, Tp]): R

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

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

Attributes

Retrieves the parallelism level of the task execution environment.

Retrieves the parallelism level of the task execution environment.

Attributes

Abstract fields

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

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

Attributes