Skip to content

Add stop token propagation tests and document inheritance behavior #214

Merged
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/163-stop-propagation
Mar 5, 2026
Merged

Add stop token propagation tests and document inheritance behavior #214
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/163-stop-propagation

Conversation

@mvandeberg
Copy link
Contributor

Closes #163

The run/run_async API already supports stop token injection, but this was undertested and underdocumented, making it appear missing.

Add tests verifying that run(ex) inherits the caller's stop token, run(ex, st) overrides it, and run_async propagates tokens to deferred tasks. Restructure the launching docs into a unified stop token propagation section and fix the download_manager example to use io_env propagation.

…ppalliance#163)

The run/run_async API already supports stop token injection, but this
was undertested and underdocumented, making it appear missing.

Add tests verifying that run(ex) inherits the caller's stop token,
run(ex, st) overrides it, and run_async propagates tokens to deferred
tasks. Restructure the launching docs into a unified stop token
propagation section and fix the download_manager example to use
io_env propagation.
@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (4)
  • doc/modules/ROOT/pages/4.coroutines/4b.launching.adoc is excluded by !**/doc/**
  • doc/modules/ROOT/pages/4.coroutines/4e.cancellation.adoc is excluded by !**/doc/**
  • test/unit/ex/run.cpp is excluded by !**/test/**
  • test/unit/ex/run_async.cpp is excluded by !**/test/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e6141f3-cab9-4c62-abaa-4a61d84ef575

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://214.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-05 17:16:43 UTC

@cppalliance-bot
Copy link

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

Build time: 2026-03-05 17:26:20 UTC

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.94%. Comparing base (5fc166e) to head (bcb682b).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #214   +/-   ##
========================================
  Coverage    91.94%   91.94%           
========================================
  Files           76       76           
  Lines         4504     4504           
========================================
  Hits          4141     4141           
  Misses         363      363           

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

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

@mvandeberg mvandeberg merged commit c550bf5 into cppalliance:develop Mar 5, 2026
36 checks passed
@mvandeberg mvandeberg deleted the pr/163-stop-propagation branch March 5, 2026 18:34
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.

thread_pool: missing launch function and no stop_token injection

2 participants