February 2025
Intermediate to advanced
248 pages
6h 36m
English
This chapter covers
Task and Task<T> to check whether an operation has completedTask and Task<T> to notify your code when the operation has completedTask and Task<T> in synchronous codeasync/await worksIn the previous chapter, we saw how the compiler can transform our code to add language features. In this chapter, we’ll learn how it applies to async/await.
async/await is a feature that lets us write asynchronous code as if it were normal synchronous code. With asynchronous programming, when we perform an operation that would normally make the CPU wait (usually for data to arrive from some device—for example, reading a file), instead of waiting, we just do something else. Making asynchronous ...
Read now
Unlock full access