Skip to content

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

Merged
alitto merged 1 commit into
mainfrom
fix/AD/queue-size-one
Apr 20, 2025
Merged

alitto merged 1 commit into
mainfrom
fix/AD/queue-size-one

Conversation

@alitto

@alitto alitto commented Apr 20, 2025

Copy link
Copy Markdown
Owner

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.

@codecov

codecov Bot commented Apr 20, 2025 •

Copy link
Copy Markdown

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
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