The type of the environment is more specific in the implementations.
The type of the environment is more specific in the implementations.
Executes a task and returns a future.
Executes a task and returns a future. Forwards an exception if some task threw it.
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.
Retrieves the parallelism level of the task execution environment.
Retrieves the parallelism level of the task execution environment.
A trait implementing the scheduling of a parallel collection operation.
Parallel collections are modular in the way operations are scheduled. Each parallel collection is parametrized with a task support object which is responsible for scheduling and load-balancing tasks to processors.
A task support object can be changed in a parallel collection after it has been created, but only during a quiescent period, i.e. while there are no concurrent invocations to parallel collection methods.
There are currently a few task support implementations available for parallel collections. The scala.collection.parallel.ForkJoinTaskSupport uses a fork-join pool internally.
The scala.collection.parallel.ExecutionContextTaskSupport uses the default execution context implementation found in scala.concurrent, and it reuses the thread pool used in scala.concurrent.
The execution context task support is set to each parallel collection by default, so parallel collections reuse the same fork-join pool as the future API.
Here is a way to change the task support of a parallel collection:
Configuring Parallel Collections section on the parallel collection's guide for more information.