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.
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
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 and is used by default on JVM 1.6 or greater. The less efficient scala.collection.parallel.ThreadPoolTaskSupport is a fallback for JVM 1.5 and JVMs that do not support the fork join pools. 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 (this is either a fork join pool or a thread pool executor, depending on the JVM version). 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.