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
Publisher resources
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
Pro Asynchronous Programming with .NET
Pro Asynchronous Programming with .NET teaches the essential skill of asynchronous programming in .NET. It answers …
book
Hands-On Parallel Programming with C# 8 and .NET Core 3
Enhance your enterprise application development skills by mastering parallel programming techniques in .NET and C# Key …
book
C# 5.0 Unleashed
Buy the print and get the eBook version for free! See inside the book for access …
book
Building Web APIs with ASP.NET Core
Build fully-featured APIs with ASP.NET Core! This all-practical guide is written like a real development project, …