Task

Get to learn what tasks are and how they are performed.

parallel()

Operations that are executed in parallel with other operations of a program are called tasks. Tasks are represented by the type std.parallelism.Task.

In fact, parallel() constructs a new Task object for every worker thread and starts that task automatically. parallel() then waits for all of the tasks to be completed before finally exiting the loop. parallel() is very convenient as it constructs, starts, and waits for the tasks automatically.

Handling tasks explicitly

When tasks do not correspond to or cannot be represented ...