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

Time for action - Parallelized counter

Now that you have completed the nebula finder application, a team of scientists think you have a data warehouse, and they want your help in creating some interesting statistics about these images. They begin asking you questions about the potential nebulae, using different widths, heights, formulas, and things like that! Collecting all the blobs into a single list and using LINQ, you can query the objects using methods. However, using PLINQ can provide a better performance, as it is able to parallelize the queries. So now, let us learn to use PLINQ!

Now, we are going to use PLINQ to count the number of potential nebulae using the same technique as earlier, but we are going to leave the code prepared for generating ...

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