Skip to content

Symmetric-transfer thread_pool dispatch on worker threads#269

Open
sgerbino wants to merge 1 commit intocppalliance:developfrom
sgerbino:pr/thread-pool-dispatch
Open

Symmetric-transfer thread_pool dispatch on worker threads#269
sgerbino wants to merge 1 commit intocppalliance:developfrom
sgerbino:pr/thread-pool-dispatch

Conversation

@sgerbino
Copy link
Copy Markdown
Collaborator

dispatch() previously always posted, forcing a queue round-trip even when the caller was already running on one of the pool's workers. It now returns c.h when the calling thread is a worker of the pool, per the Executor concept's inline-resume contract. A thread_local_ptr marker set via RAII in run() identifies pool workers; cross-pool and non-worker callers still post.

dispatch() previously always posted, forcing a queue round-trip even
when the caller was already running on one of the pool's workers. It
now returns c.h when the calling thread is a worker of the pool, per
the Executor concept's inline-resume contract. A thread_local_ptr
marker set via RAII in run() identifies pool workers; cross-pool and
non-worker callers still post.
@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented Apr 24, 2026

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

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

2026-04-24 18:01:51 UTC

@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented Apr 24, 2026

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

Build time: 2026-04-24 18:14:02 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.38%. Comparing base (2b3fe69) to head (9faa534).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #269      +/-   ##
===========================================
+ Coverage    92.35%   92.38%   +0.03%     
===========================================
  Files          168      168              
  Lines         9354     9369      +15     
===========================================
+ Hits          8639     8656      +17     
+ Misses         715      713       -2     
Flag Coverage Δ
linux 92.37% <ø> (+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/ex/thread_pool.hpp 100.00% <ø> (ø)
src/ex/thread_pool.cpp 100.00% <100.00%> (ø)

... and 3 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 2b3fe69...9faa534. Read the comment docs.

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

@sgerbino sgerbino force-pushed the pr/thread-pool-dispatch branch from 7f92267 to 9faa534 Compare April 24, 2026 17:55
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.

2 participants