#execution
2 posts tagged #execution.
Structured concurrency: what std::future never had
A std::future is a dead end: you launch it, you get() it once, and composing two of them means manual threads and locks. C++26 senders compose. when_all runs work concurrently and joins it into one result, with no mutex and no leaked threads. Here is the pattern, running on Compiler Explorer.
Hello, sender: your first std::execution pipeline
C++26 shipped three big things: reflection, contracts, and std::execution. The first two get the headlines on this blog. std::execution (P2300) is the new standard model for asynchronous and parallel work, and it is the one most codebases will reach for first. Here is the smallest pipeline that does real work, running today on Compiler Explorer.