... continued

Continues the discussion on the awaitable concept.

Using Task as Awaitables

The discussion in the previous section was from an instructional standpoint. In most instances, you should never have the need to roll out your own awaitable type. We can wrap any snippet we would like to await in a task and then await the task object. For instance, consider the snippet below:

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.