P2583R0 — Symmetric Transfer and Sender Composition
(1 items)
LEWG
This paper documents a fundamental architectural incompatibility between C++20 symmetric transfer (P0913R1) and the sender model of std::execution (P2300R10). Sender algorithms compose operations through non-coroutine struct-based receivers with void-returning set_value, making it structurally impossible for await_suspend to return a coroutine_handle<> and perform a tail call, which prevents constant-stack coroutine chains when co_awaiting senders. The paper argues this gap is not a missing feature but an architectural consequence of the sender model's design choices, inherited by std::execution::task (P3552R3), and that available mitigations such as trampoline schedulers reintroduce the runtime costs symmetric transfer was adopted to eliminate.
- Page 1, metadata header / Revision History — Document date states 2026-02-22 (February) but revision history labels R0 as March 2026; the month is internally inconsistent. [1]
References — Anthropic Citations API
[1]
"(metadata) "Date: 2026-02-22" / (revision history) "R0: March 2026 (pre-Croydon mailing)""
"(metadata) "Date: 2026-02-22" / (revision history) "R0: March 2026 (pre-Croydon mailing)""
Summary: Proposes extending P2300 (std::execution) with a symmetric transfer mechanism for sender composition, allowing coroutine-based sender chains to avoid unbounded stack growth by transferring execution directly between coroutine frames rather than nesting resumptions.
Pipeline: Discovery (Anthropic Opus + Citations API) → Verification Gate (OpenRouter Opus) → Report Writer (OpenRouter Opus)
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.
Provenance: All references are machine-verified character positions from the Anthropic Citations API — deterministic, exact substrings, not model-generated quotes.