About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

The State Machine Fueling Asynchronous Methods

When an asynchronous method executes, it may come across one or more await expressions. At that point in time, a dialogue is started with the object being awaited. This object is commonly referred to as the task, even though it doesn’t necessarily have to be a Task or Task<T> instance. We discuss the await pattern later on, also explaining how other types can be made awaitable.

What happens upon encountering a task being awaited depends on the current state of the task. Maybe the operation it represents has already been completed, allowing us to continue to execute the current method. However, most likely we’ll be unlucky and truly need to await the operation’s outcome before we can continue execution ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required