O'Reilly logo

C# Multithreaded and Parallel Programming by Rodney Ringler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exploring the TaskFactory class

A key class of the TPL in the System.Threading.Tasks namespace is the TaskFactory class. TaskFactory is used in the creation and scheduling of tasks. The TaskFactory class has a number of methods that make scheduling and managing tasks very easy. These include starting and continuing methods as well as a series of methods that conform to the asynchronous programming model that we will cover in Chapter 11, The Asynchronous Programming Model. Essentially, this class wraps many of the common task design patterns into methods for ease of use and development. This is yet another way that TPL makes multithreaded development "lightweight".

Most of our work with TaskFactory will be covered in Chapter 6, Task-based Parallelism ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required