Chapter 23
Improving throughput by using tasks
After completing this chapter, you will be able to:
Describe the benefits of implementing parallel operations in an application.
Explain the relationship between parallelization and the number of processor cores available.
Use the
Task
class and theParallel
class to create and run parallel operations in an application.Cancel long-running tasks and handle exceptions raised by parallel operations.
In the bulk of this book, you’ve learned how to use C# to write programs that run in a single-threaded manner. By single-threaded, I mean that at any one point in time, a program executes a single instruction. This might not always be the most efficient approach for an application to take, however. If ...
Get Microsoft Visual C# Step by Step, 10th Edition 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.