stdexec
is an experimental reference implementation of the Senders model of asynchronous programming proposed by P2300 - std::execution
for adoption into the C++ Standard.
Purpose of this Repository:
- Provide a proof-of-concept implementation of the design proposed in P2300.
- Provide early access to developers looking to experiment with the Sender model.
- Collaborate with those interested in participating or contributing to the design of P2300 (contributions welcome!).
stdexec
is experimental in nature and subject to change without warning.
The authors and NVIDIA do not guarantee that this code is fit for any purpose whatsoever.
Below is a simple program that executes three senders concurrently on a thread pool. Try it live on godbolt!.
#include <stdexec/execution.hpp>
#include <exec/static_thread_pool.hpp>
int main()
{
// Declare a pool of 3 worker threads:
exec::static_thread_pool pool(3);
// Get a handle to the thread pool:
auto sched = pool.get_scheduler();
// Describe some work:
// Creates 3 sender pipelines that are executed concurrently by passing t