Summary

In this chapter, we have reviewed a problem of parallel computations granularity. We have tried different ways to split our program into concurrently executing pieces and saw the performance impact in each case. Also, we've implemented a real computation task of rendering spheres with a ray tracing algorithm and learned to parallelize it with threads and Task Parallel Library.

In the next chapter, we will continue to learn Task Parallel Library. We shall review this framework in detail and clarify every aspect of using it including how the tasks are being run, how we combine tasks together, and how to handle exceptions and timeouts.

Get Mastering C# Concurrency now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.