|
1 | 1 | --- |
2 | 2 | title: "Info: Consuming Senders from Coroutine-Native Code" |
3 | 3 | document: P4092R0 |
4 | | -date: 2026-03-13 |
| 4 | +date: 2026-04-10 |
5 | 5 | reply-to: |
6 | 6 | - "Vinnie Falco <vinnie.falco@gmail.com>" |
7 | 7 | - "Steve Gerbino <steve@gerbino.co>" |
@@ -112,14 +112,14 @@ Does not use `execution::task`. |
112 | 112 |
|
113 | 113 | ## 5. What the Bridge Does Not Require |
114 | 114 |
|
115 | | -[P3552R3](https://wg21.link/p3552r3)<sup>[15]</sup>, "Add a Coroutine Task Type," defines `std::execution::task`. Its `connect` operation type-erases the operation state, and its error path converts `error_code` to `exception_ptr` via `AS-EXCEPT-PTR`. The bridge avoids both mechanisms: |
| 115 | +`std::execution::task` ([P3552R3](https://wg21.link/p3552r3)<sup>[15]</sup>, revised at Croydon by [P3980R1](https://wg21.link/p3980r1)<sup>[16]</sup>, [P3941R4](https://wg21.link/p3941r4)<sup>[17]</sup>, [P3927R2](https://wg21.link/p3927r2)<sup>[18]</sup>, [P4151R1](https://wg21.link/p4151r1)<sup>[19]</sup>) is a sender-returning coroutine type. Its promise type-erases the downstream receiver, and its error path converts `error_code` to `exception_ptr` via `AS-EXCEPT-PTR`. None of the Croydon revisions changed these properties. The bridge avoids both mechanisms: |
116 | 116 |
|
117 | | -| Property | `execution::task` | Bridge | |
118 | | -| ------------------------------------ | ------------------------- | ------ | |
119 | | -| Routine I/O errors become exceptions | Yes (via `AS-EXCEPT-PTR`) | No | |
120 | | -| Type erasure on connect | Yes | No | |
121 | | -| Allocation beyond coroutine frame | Yes (type-erased state) | No | |
122 | | -| Requires `std::execution::task` | - | No | |
| 117 | +| Property | `execution::task` | Bridge | |
| 118 | +| ------------------------------------ | ------------------------------ | ------ | |
| 119 | +| Routine I/O errors become exceptions | Yes (via `AS-EXCEPT-PTR`) | No | |
| 120 | +| Type-erased dispatch | Yes (promise continuation) | No | |
| 121 | +| Allocation beyond coroutine frame | Yes (inner coroutine frame) | No | |
| 122 | +| Requires `std::execution::task` | - | No | |
123 | 123 |
|
124 | 124 | The bridge consumes senders without `std::execution::task`. |
125 | 125 |
|
@@ -173,6 +173,14 @@ The authors thank Dietmar Kühl for `beman::execution`<sup>[5]</sup> and for |
173 | 173 |
|
174 | 174 | 15. [P3552R3](https://wg21.link/p3552r3) - "Add a Coroutine Task Type" (Dietmar Kühl, Maikel Nadolski, 2025). https://wg21.link/p3552r3 |
175 | 175 |
|
| 176 | +16. [P3980R1](https://wg21.link/p3980r1) - "Task's Allocator Use" (Dietmar Kühl, 2026). https://wg21.link/p3980r1 |
| 177 | + |
| 178 | +17. [P3941R4](https://wg21.link/p3941r4) - "Scheduler Affinity" (Dietmar Kühl, 2026). https://wg21.link/p3941r4 |
| 179 | + |
| 180 | +18. [P3927R2](https://wg21.link/p3927r2) - "`task_scheduler` Bulk Execution" (Eric Niebler, 2026). https://wg21.link/p3927r2 |
| 181 | + |
| 182 | +19. [P4151R1](https://wg21.link/p4151r1) - "Rename `affine_on`" (Robert Leahy, 2026). https://wg21.link/p4151r1 |
| 183 | + |
176 | 184 | --- |
177 | 185 |
|
178 | 186 | ## Appendix A. Bridge Implementation |
|
0 commit comments