The Tasks component defines types that simplify the work of writing concurrent and asynchronous code. It allows developers to be more productive by simplifying the process of adding parallelism and concurrency to applications.
The Tasks component is completely free to use! You can download the component today through our trusted e-commerce partner, FastSpring.
This component handles the partitioning of the work, scheduling of threads, load balancing, state management and other low-level details. The functions included in this component scale dynamically to most efficiently use all available processors.
The Tasks component supports both data and task parallelism through the Parallel class that implements parallel methods for common operations such as for loops and execution of a set of statements. Its parallel for loop is very similar to a sequential loop; you do not have to create threads or queue work items.
Both the Parallel.For and Parallel.Invoke methods have several overloads with specialized parameters. For example, the ParallelOptions parameter lets you request that an operation should stop execution at the system's earliest convenience (through the CancellationToken and ParallelLoopState properties).