beman.execution
provides the basic vocabulary for asynchronous
programming as well as important algorithms implemented in terms
of this vocabulary. The key entities of the vocabulary are:
scheduler
used to control where operations are executed.- The key operation is
schedule(scheduler) -> sender
.
- The key operation is
sender
used to represent work.- The key operation is
connect(sender, receiver) -> operation-state
.
- The key operation is
receiver
used to receive completion notifications.- There are multiple operations on receivers:
set_value(receiver, args...)
for successful completions.set_error(receiver, error)
to report errors.set_stopped(receiver)
to report cancellation.
- There are multiple operations on receivers:
operation-state
to represent a ready to run work graph .- The key operation is
start(state)
.
- The key operation is
Using these operations some fundamental algorithms are implemented, e.g.:
just(args...)
as the starting point of a work graph without a specified scheduler`.let_value(sender, fun)
to produce a sender based onsender
's results.on(scheduler, sender)
to executesender
onscheduler
.transfer(sender, scheduler)
to complete with withsender
's results onscheduler
.when_all(sender ...)
to complete when allsender
s have completed.bulk(...)
to executed execute work, potentially concurrently.
Implements: std::execution
(P2300R10).
Status: Under development and not yet ready for production use.
There are plenty of things which need to be done. See the
contributions page
for some ideas how to contribute. The resources page
contains some links for general information about the sender/receivers and std::execution
.
Library | Linux | MacOS | Windows |
---|---|---|---|
build |
The following instructions build the library and the examples:
cmake --workflow --list-presets
Available workflow presets:
"debug"
"release"
cmake --workflow --preset release
The implementation compiles and passes tests using clang, gcc, and MSVC++.
<stop_token>
example: Compiler Explorer