O'Reilly logo

Mastering C# and .NET Framework by Marino Posadas

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

Task Parallel

While all this is important, there are cases where this solution lacks enough flexibility, and that's why we include Task Parallel Library in the set of the software tools available.

We've seen the basics of the Task object in Chapter 3, Advanced Concepts of C# and .NET, and Chapter 12, Performance, but now it's time to look at some more advanced aspects that make this object one of the most interesting in .NET Framework regarding parallel programming.

Communication between threads

As you know, the results obtained after task completions can be of any type (Generics included).

When you create a new Task<T> object, you inherit several methods and properties to facilitate data manipulation and retrieval. For example, you have properties ...

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