Senders/Receivers — structured concurrency model.
1#include <execution>23using namespace std::execution;45auto work = just(42)6 | then([](int x) { return x * 2; })7 | then([](int x) { return std::to_string(x); });89sync_wait(work); // blocks until done
Key concepts:
Schedulers:
1auto pool = thread_pool(4);2auto sched = pool.get_scheduler();34auto work = just(42)5 | on(sched)6 | then([](int x) { return x * 2; });
Benefits: