Book description
If you’re writing one of several applications that call for asynchronous programming, this concise hands-on guide shows you how the async feature in C# 5.0 can make the process much simpler. Along with a clear introduction to asynchronous programming, you get an in-depth look at how the async feature works and why you might want to use it in your application.
Written for experienced C# programmers—yet approachable for beginners—this book is packed with code examples that you can extend for your own projects.
- Write your own asynchronous code, and learn how async saves you from this messy chore
- Discover new performance possibilities in ASP.NET web server code
- Explore how async and WinRT work together in Windows 8 applications
- Learn the importance of the await keyword in async methods
- Understand which .NET thread is running your code—and at what points in the program
- Use the Task-based Asynchronous Pattern (TAP) to write asynchronous APIs in .NET
- Take advantage of parallel computing in modern machines
- Measure async code performance by comparing it with alternatives
Table of contents
- Preface
- 1. Introduction
- 2. Why Programs Need to Be Asynchronous
- 3. Writing Asynchronous Code Manually
- 4. Writing Async Methods
- 5. What await Actually Does
- 6. The Task-Based Asynchronous Pattern
- 7. Utilities for Async Code
- 8. Which Thread Runs My Code?
- 9. Exceptions in Async Code
- 10. Parallelism Using Async
- 11. Unit Testing Async Code
- 12. Async in ASP.NET Applications
- 13. Async in WinRT Applications
- 14. The Async Compiler Transform—in Depth
-
15. The Performance of Async Code
- Measuring Async Overhead
- Async Versus Blocking for a Long-Running Operation
- Optimizing Async Code for a Long-Running Operation
- Async Versus Manual Asynchronous Code
- Async Versus Blocking Without a Long-Running Operation
- Optimizing Async Code Without a Long-Running Operation
- Async Performance Summary
- About the Author
- Copyright
Product information
- Title: Async in C# 5.0
- Author(s):
- Release date: September 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449337162
You might also like
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
CLR via C#, Fourth Edition
Dig deep and master the intricacies of the common language runtime, C#, and .NET development. Led …
book
Unit Testing Principles, Practices, and Patterns
Unit Testing Principles, Patterns and Practices teaches you to design and write tests that target the …
book
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn’t clean, it can bring a development organization …