Skip to content

docs(when_any): clarify wait_for_one_success semantics and patterns#326

Merged
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/265-when-any-error-success-doc
Jun 19, 2026
Merged

docs(when_any): clarify wait_for_one_success semantics and patterns#326
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/265-when-any-error-success-doc

Conversation

@mvandeberg

@mvandeberg mvandeberg commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

when_any selects a winner by success (!ec); a failing child neither wins nor cancels its siblings. This was reported as a bug (#265) but is by design. Document the behavior explicitly and the two patterns for treating an error as a win, and replace the dangling "see Racing Tasks" reference (which pointed at an unpublished doc/unlisted/ page).

  • doc/.../4f.composition.adoc: add "Errors Do Not Win" and "Treating an Error as a Win" subsections under when_any; drop the dead reference.
  • include/boost/capy/when_any.hpp: add a @note to the variadic when_any docstring pointing readers to the patterns.

Resolves #265

when_any selects a winner by success (!ec); a failing child neither wins
nor cancels its siblings. This was reported as a bug (cppalliance#265)
but is by design. Document the behavior explicitly and the two patterns for
treating an error as a win, and replace the dangling "see Racing Tasks"
reference (which pointed at an unpublished doc/unlisted/ page).

- doc/.../4f.composition.adoc: add "Errors Do Not Win" and "Treating an
  Error as a Win" subsections under when_any; drop the dead reference.
- include/boost/capy/when_any.hpp: add a @note to the variadic when_any
  docstring pointing readers to the patterns.
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://326.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-06-19 17:14:56 UTC

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.07%. Comparing base (d21ae5d) to head (2210d33).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #326   +/-   ##
========================================
  Coverage    98.07%   98.07%           
========================================
  Files          164      164           
  Lines         8758     8774   +16     
========================================
+ Hits          8589     8605   +16     
  Misses         169      169           
Flag Coverage Δ
linux 98.17% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/boost/capy/when_any.hpp 100.00% <ø> (ø)

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d21ae5d...2210d33. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://326.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://326.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://326.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-06-19 17:34:28 UTC

@mvandeberg mvandeberg merged commit 6663806 into cppalliance:develop Jun 19, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when_any doesn't cancel children tasks on error

2 participants