O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

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

Parallelizing queries

So far, we have been working with parallel loops using the .NET Parallel Extensions combined with everything we had learned about updating the UI and making cross-thread calls. However, one of the most interesting jobs to improve performance and provide a more responsive UI is to run large queries and certain statistics. How can we use these new parallel extensions to improve the performance of queries and statistics in our applications? Is there any simple way to achieve that goal?

LINQ (Language-Integrated Query) was introduced in C# 3.0 and is very useful for processing queries for many different data sources. The simplest way to parallelize a query is to use PLINQ (Parallel Language-Integrated Query), introduced in the ...

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