๐Ÿงต C++ Concurrency and Parallelism
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Tasks, Futures, and Asynchrony
Part 3 4 chapters

Tasks, Futures, and Asynchrony

Futures and packaged tasks, coroutines, async runtimes and event loops, and stackful fibers.

Doc 10

Futures, Promises, and Packaged Tasks

std::async and its launch policies, the future/promise pair, packaged_task, shared_future, and how exceptions cross the async boundary.

13 minRead โ†’
Doc 11

Coroutines in Depth

C++20 coroutine machinery, promise_type and awaitables, the heap allocation that the compiler may elide, and a look ahead to C++26 senders and receivers.

16 minRead โ†’
Doc 12

Async Runtimes and Event Loops

The epoll event loop underneath async I/O, Boost.Asio's strand and work-guard, and the question of which thread actually runs a given handler.

16 minRead โ†’
Doc 13

Fibers and Stackful Coroutines

Stackful fibers versus stackless coroutines, what the fiber's own stack buys and costs, the guard page, and choosing a scheduler.

15 minRead โ†’
โ† Previous part Shared State and Synchronization Next part โ†’ Parallelism and Throughput
C++ Concurrency and Parallelism
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—