Summary: Asynchronous Programming with Coroutines

A summary of what we discussed in the “Asynchronous Programming with Coroutines” chapter.

In this chapter, you’ve seen how to use C++ coroutines for writing asynchronous tasks. To be able to implement the infrastructure in the form of a Task type and a sync_wait() function, you needed to fully understand the concept of awaitable types and how they can be used to customize the behavior of coroutines in C++. By using Boost.Asio, we could build a truly minimal but fully functional concurrent server application executing on a single thread while handling multiple client sessions.

Get hands-on with 1200+ tech skills courses.