Skip to content

fix(pool): prevent race condition with blocking pools #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2025

Conversation

alitto
Copy link
Owner

@alitto alitto commented Apr 20, 2025

Fixes

  • When a pool is configured in blocking mode, it could happen that a special sequence of calls to the Submit method produces some of them to block indefinitely if no more tasks are ever submitted to the pool before stopping it. This PR handles these corner cases by attempting to wake up submit waiters after submitting a task and after reading up all items from the queue.

Copy link

codecov bot commented Apr 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.56%. Comparing base (5cc70c2) to head (ebc6fce).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   95.53%   95.56%   +0.03%     
==========================================
  Files          11       11              
  Lines         761      767       +6     
==========================================
+ Hits          727      733       +6     
  Misses         31       31              
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@alitto alitto merged commit 198a10d into main Apr 20, 2025
15 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.

1 participant