Async C++: The Complete Guide
300 pages
English
PDF
4.5

Async C++: The Complete Guide

Async C++: The Complete Guide

Author:

Year:

Summary:

The book "Async C++: The Complete Guide" is a comprehensive practical guide to modern asynchronous programming techniques in C++, focusing on the C++20 and C++23 standards. The author, Alexey Voronov, a senior developer with 15 years of experience building high-load server solutions, shares proven patterns and best practices.



What is this book about?

The publication covers a full range of topics — from the basics of event-driven architecture to an in-depth dive into C++20 coroutines. You will learn:

  • How coroutines work (co_await, co_yield, co_return) and how to use them to create efficient asynchronous flows.
  • The principles of building event loops using Boost.Asio and custom implementations.
  • The difference between futures, promises, and std::async, and when each is preferable.
  • Techniques for working with multithreading: mutexes, lock-free structures, atomic operations.
  • Error handling in asynchronous code, avoiding deadlocks and race conditions.
  • Integration of async C++ with network protocols (HTTP, WebSocket) and file systems.


Who is this book for?

The book is intended for middle and senior C++ developers who want to transition from sequential code to high-performance asynchronous systems. It will also be useful for:

  • Software architects designing backends for microservices and game servers.
  • Embedded systems developers where determinism and low memory consumption are important.
  • Graduate and postgraduate students studying parallel computing.


What will you learn after reading?

  • Write asynchronous code that does not block the execution thread, saving CPU resources.
  • Build your own libraries for asynchronous input/output.
  • Optimize application performance for multi-core systems.
  • Debug and profile asynchronous programs using modern tools.


Each chapter contains ready-to-run code examples that you can modify. The book is written in a lively style, with an emphasis on practice rather than dry theory. If you want to take your C++ skills to the next level and learn to create fast, scalable applications — this guide is for you.

Recommendations