Article

C++ futures part 3: The mental model for std::async

The Old New Thing ·The Old New Thing ·Published 2026-10-14 ·5 min read

This article continues the exploration of C++ futures, focusing on the std::async function. It discusses the complexities of how std::async operates, including its invocation timing and threading behavior.

From the article

We continue our study of C++ futures with std:: async .

The more complex case is the std:: async . You give std:: async a callable and optional parameters to pass to that callable, and you also specify how and when you want the callable to be invoked. You get two axes: Do you want it to be calculated immediately or on demand? Do you want the calculation to happen on the thread that requests the value or on its own thread?

Now, you’d think you could fill out the table like this:


Share this resource


Discovered 2026-10-16 Source The Old New Thing Archive 2026-10 → c++futuresstd::async