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
video
Design Patterns Using C# and .NET Core
Design patterns are reusable solutions to common programming problems. They speed up the development process by …
book
Hands-On Design Patterns with C# and .NET Core
Apply design patterns to solve problems in software architecture and programming using C# 7.x and .NET …
video
C# Async Fundamentals LiveLessons (Video Training)
C# Async Fundamentals LiveLessons As one of the most important new feature in the C# language, …
video
50 Things You've Been Doing Wrong in C# and .NET Core
Professional software development involves many different skills. As a C# developer, you must be skilled in …