Update documentation table of contents and tidy README#117
Update documentation table of contents and tidy README#117vinniefalco merged 3 commits intocppalliance:developfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR refactors the corosio library to unify executor and cancellation token handling by replacing separate Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
An automated preview of the documentation is available at https://117.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-11 05:03:34 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #117 +/- ##
===========================================
+ Coverage 80.12% 80.35% +0.22%
===========================================
Files 65 65
Lines 5640 5639 -1
===========================================
+ Hits 4519 4531 +12
+ Misses 1121 1108 -13
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
GCOVR code coverage report https://117.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-02-10 01:42:36 UTC |
079e841 to
6cff46f
Compare
Refactor all IoAwaitable types to use the new unified io_env parameter instead of separate executor_ref and stop_token. This aligns corosio with the capy library's io_env refactoring.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/corosio/src/detail/resume_coro.hpp (1)
30-38:⚠️ Potential issue | 🟡 MinorRemove
resume_coro.hpp— the function is now completely unused.The migration from
resume_corotodispatch_corois complete;dispatch_corois now used in 28+ locations across all platform implementations (select, iocp, kqueue, epoll). No callers ofresume_cororemain in the codebase. Since this is an internal detail (not exported in public headers), it is safe to delete the file entirely.
🧹 Nitpick comments (5)
src/corosio/src/detail/kqueue/acceptors.cpp (1)
46-46: Nit: block comment describes the old resume path.Line 46 says "resumed via saved_ex.dispatch()" but the code now uses
dispatch_coro(saved_ex, saved_h).resume(). Consider updating the comment to match the new mechanism.src/corosio/src/detail/iocp/signals.hpp (1)
23-24: Pre-existing: duplicate#include <system_error>.Lines 23 and 24 both include
<system_error>. Not introduced by this PR, but worth cleaning up if you're in the area.Proposed fix
`#include` "src/detail/intrusive.hpp" `#include` <system_error> - -#include <system_error>src/corosio/src/detail/posix/resolver_service.cpp (1)
498-503:work_finished()called beforedispatch_coro— confirm ordering is intentional.
impl->svc_.work_finished()at line 501 decrements the scheduler's outstanding work count before the coroutine is resumed at line 502. If this was the last work item, it could triggerstop()on the scheduler. The resumed coroutine may then attempt to perform further I/O operations on a stopped scheduler.This ordering was presumably the same before the migration (with
resume_coro), so it's not a new issue. Just flagging for awareness since the kqueue/select op patterns callwork_finished()via thework_guard/work_cleanupRAII in the scheduler'sdo_one()loop, not in the op itself.include/boost/corosio/resolver.hpp (1)
230-233:await_readychecks a default-constructedtoken_— always returnsfalse.
token_is only populated inawait_suspend(line 246), butawait_ready(line 232) is called beforeawait_suspend. A defaultstd::stop_tokenhas no associated stop state, sostop_requested()always returnsfalse, makingawait_readya no-op. The same pattern exists inreverse_resolve_awaitableat line 272.This is pre-existing behavior (not introduced by this PR), but it means the early-exit optimization for already-cancelled tokens never triggers.
src/corosio/src/detail/iocp/sockets.cpp (1)
404-414: Asymmetric error handling betweendo_read_ioanddo_write_io.On synchronous failure,
do_read_ioinvokes the handler inline (line 413:op.invoke_handler()), whiledo_write_ioposts the operation to the scheduler queue (line 449:svc_.post(&op)). Both are called via symmetric-transfer initiators so the caller is already suspended in both cases, making inline completion equally safe for writes. The inconsistency is not a bug, but it makes the code harder to reason about—consider aligning the two paths.Also applies to: 441-450
Every coroutine resumption must go through either symmetric transfer or the scheduler queue -- never through an inline resume() or dispatch() that creates a frame below the resumed coroutine. dispatch() now returns std::coroutine_handle<> instead of void. Same-thread returns h for symmetric transfer; different-thread posts and returns noop_coroutine(). Callers in await_suspend return the handle up the chain. Scheduler pump sites call .resume() on the result. Changes: - basic_io_context::executor_type::dispatch returns handle - Replace resume_coro with dispatch_coro (returns handle) - All platform backends updated (IOCP, epoll, kqueue, select) - tcp_server await_suspend uses symmetric transfer - Fix IOCP cancel race: re-check cancelled flag after WSARecv/ WSASend returns IO_PENDING; set cancelled in do_cancel_impl - Stress tests assert on hung reads instead of silently continuing - cancel_close stress test yields before cancel to let posted read operation start
Summary by CodeRabbit