Skip to content

Strand: thread continuation through queue, drop strand_op wrapper (#149)#282

Merged
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/149-strand-intrusive
May 15, 2026
Merged

Strand: thread continuation through queue, drop strand_op wrapper (#149)#282
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/149-strand-intrusive

Conversation

@mvandeberg
Copy link
Copy Markdown
Contributor

@mvandeberg mvandeberg commented May 15, 2026

The strand pending queue previously wrapped each posted handle in a heap-allocated strand_op coroutine solely for its next pointer. The user-facing continuation already carries an intrusive next, so link continuations directly through the queue and delete the wrapper machinery (strand_op, frame_prefix, make_strand_op, free_list_, the prefix-allocator new/delete).

The detail-layer strand_service::dispatch/post signatures change from coroutine_handle<> to continuation&. Public strand::post/ dispatch signatures are unchanged.

Tightens the implementation to the documented contract: a continuation must outlive its time in any executor queue. Tests that posted stack-local continuations and let them die before dispatch are updated to hoist storage out to a vector.

Resolves #149

…palliance#149)

The strand pending queue previously wrapped each posted handle in a
heap-allocated `strand_op` coroutine solely for its `next` pointer.
The user-facing `continuation` already carries an intrusive `next`,
so link continuations directly through the queue and delete the
wrapper machinery (`strand_op`, `frame_prefix`, `make_strand_op`,
`free_list_`, the prefix-allocator new/delete).

The detail-layer `strand_service::dispatch`/`post` signatures change
from `coroutine_handle<>` to `continuation&`. Public `strand::post`/
`dispatch` signatures are unchanged.

Tightens the implementation to the documented contract: a continuation
must outlive its time in any executor queue. Tests that posted
stack-local continuations and let them die before dispatch are updated
to hoist storage out to a vector.
@cppalliance-bot
Copy link
Copy Markdown

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

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

2026-05-15 20:06:51 UTC

@cppalliance-bot
Copy link
Copy Markdown

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

Build time: 2026-05-15 20:21:55 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.27%. Comparing base (3a37a17) to head (4610889).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #282      +/-   ##
===========================================
+ Coverage    92.01%   92.27%   +0.25%     
===========================================
  Files          164      164              
  Lines         8944     8862      -82     
===========================================
- Hits          8230     8177      -53     
+ Misses         714      685      -29     
Flag Coverage Δ
linux 92.26% <ø> (+0.25%) ⬆️

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

Files with missing lines Coverage Δ
include/boost/capy/ex/strand.hpp 100.00% <100.00%> (ø)
src/ex/detail/strand_queue.hpp 100.00% <100.00%> (+23.43%) ⬆️
src/ex/detail/strand_service.cpp 95.61% <100.00%> (ø)

... and 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 3a37a17...4610889. 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 b8b4217 into cppalliance:develop May 15, 2026
38 checks passed
@mvandeberg mvandeberg deleted the pr/149-strand-intrusive branch May 15, 2026 21: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.

strand intrusive node should go in the awaitable

2 participants