Update docs for io_result-based when_all/when_any signatures#248
Update docs for io_result-based when_all/when_any signatures#248mvandeberg wants to merge 1 commit intocppalliance:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (9)
📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRemoved the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 3❌ Failed checks (3 warnings)
✅ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@example/when-any-cancellation/when_any_cancellation.cpp`:
- Around line 118-119: The comment incorrectly calls the call-site a "range
overload" though this is the two-argument when_any(...) form; update the comment
(near the existing line referencing void tasks) to say that the two-argument
when_any(...) overload returns std::variant<std::error_code, std::size_t> (i.e.,
either the error code or the winner's index) rather than calling it a range
overload so the wording matches the use of when_any(...).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: db7a51db-d55b-4519-aa79-1c201b8a6636
⛔ Files ignored due to path filters (9)
doc/modules/ROOT/pages/4.coroutines/4f.composition.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7b.producer-consumer.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7g.parallel-fetch.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7k.strand-serialization.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7l.async-mutex.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7m.parallel-tasks.adocis excluded by!**/doc/**doc/modules/ROOT/pages/7.examples/7n.custom-executor.adocis excluded by!**/doc/**doc/unlisted/coroutines-when-all.adocis excluded by!**/doc/**doc/unlisted/coroutines-when-any.adocis excluded by!**/doc/**
📒 Files selected for processing (1)
example/when-any-cancellation/when_any_cancellation.cpp
| // With void tasks, the range overload returns std::variant< std::error_code, std::size_t > | ||
| // returning either the error code or the winner's index. |
There was a problem hiding this comment.
Correct overload wording in the comment for this call site.
This function uses the two-argument when_any(...) call form here, but the comment says “range overload,” which is misleading in-context.
✏️ Suggested wording update
-// With void tasks, the range overload returns std::variant< std::error_code, std::size_t >
-// returning either the error code or the winner's index.
+// For this void-task race, `when_any` yields a variant whose alternatives encode
+// either an error code (index 0) or the winning completion alternative.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@example/when-any-cancellation/when_any_cancellation.cpp` around lines 118 -
119, The comment incorrectly calls the call-site a "range overload" though this
is the two-argument when_any(...) form; update the comment (near the existing
line referencing void tasks) to say that the two-argument when_any(...) overload
returns std::variant<std::error_code, std::size_t> (i.e., either the error code
or the winner's index) rather than calling it a range overload so the wording
matches the use of when_any(...).
|
An automated preview of the documentation is available at https://248.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-03-31 23:01:51 UTC |
|
GCOVR code coverage report https://248.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-03-31 23:16:18 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #248 +/- ##
========================================
Coverage 92.50% 92.50%
========================================
Files 170 170
Lines 9348 9348
========================================
Hits 8647 8647
Misses 701 701
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
db92ccb to
ee042fe
Compare
…ance#244) All documentation and Antora example pages still described the old API where when_all/when_any accepted plain task<T> and returned tuples/variants without error_code. Update to match the current io_result-aware combinators: - when_all children must be io_task, result is io_result<R1,...,Rn> - when_any result is variant<error_code, R1,...,Rn> with error at index 0; only !ec wins - Replace monostate references with tuple<> for void tasks - Replace fictitious timeout_after examples with the real timeout combinator - Fix when_any docs that incorrectly described exceptions as valid completions
ee042fe to
32ba620
Compare
Closes #244
All documentation and Antora example pages still described the old API where when_all/when_any accepted plain task and returned tuples/variants without error_code. Update to match the current io_result-aware combinators:
Summary by CodeRabbit