124 days ago · Tech · 0 comments

Let us consider for a moment the construction of an operation in C++26’s std::execution (hereafter exec).1 In such a construction we need several things: we need a sender, the source of an operation; and a receiver, the sink of an operation. We combine them with exec::connect(sender, receiver) to form an operation state (op_state). The resulting object captures the idea of work, but does not induce work by construction. Work begins only when we enter an operation state with exec::start(op_state). For simple programs2 the tree-shaped3 collection of operation states is fixed by composition.4 The density of footnotes in the previous sentence is sufficient evidence that we ought not linger here, for fear of foundering amongst them.

No comments yet. Log in to reply on the Fediverse. Comments will appear here.