February 2010
Beginner
400 pages
11h 13m
English
Task is a new class that represents the work you want completed. There are methods to create, schedule, and synchronize tasks in your application.
All the complexity of working with tasks is handled by the task scheduler, which in turn works with the main .NET thread pool. You can think of a task as a wrapper for the thread pool and the preferred way of scheduling threads (although there is some additional overhead). The existing thread pool methods will continue to work, but tasks are much easier to use and have additional functionality.
So how does the task scheduler work?
When tasks are created, they are added to a global task queue.
The thread pool will create a number of "worker" threads. The exact number ...