Commit 81fb33d
committed
Replace coroutine_handle with continuation in executor interface
The executor concept's dispatch() and post() now accept
continuation& instead of std::coroutine_handle<>. A continuation
wraps a coroutine handle with an intrusive next_ pointer, enabling
executors to queue work without per-post heap allocation.
The thread pool's post() previously allocated a work node on every
call (new work(h)). It now links the caller's continuation directly
into an intrusive queue — zero allocation on the hot path.
The continuation lives in the I/O awaitable for caller-handle
posting (delay, async_mutex, async_event, stream), and in
combinator/trampoline state for parent-dispatch and child-launch
patterns (when_all, when_any, timeout, run, run_async). The
IoAwaitable concept and io_awaitable_promise_base are unchanged.
Breaking change: all Executor implementations must update dispatch()
and post() signatures from coroutine_handle<> to continuation&.1 parent 150ee20 commit 81fb33d
File tree
40 files changed
+1206
-458
lines changed- bench
- doc
- modules/ROOT/pages
- 4.coroutines
- 7.examples
- 8.design
- unlisted
- example
- asio/api
- custom-executor
- include/boost/capy
- concept
- ex
- test
- src
- ex
- detail
- test
- test/unit
- ex
40 files changed
+1206
-458
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments