8000 Release Release v2.3.1 · alitto/pond · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release v2.3.1

Compare
Choose a tag to compare
@alitto alitto released this 03 Apr 23:09
· 4 commits to main since this release

Pull requests

  • fix(pool): avoid race conditions when a task is submitted while the pool is stopping by @alitto in #105
  • feat(pool): add non-blocking submission methods and dropped tasks metric by @alitto in #107

Changes

  • Ensure closed atomic bool is toggled and checked while holding the mutex to avoid race conditions.
  • Ensure workersWaitGroup.Add() is always called while holding the mutex to avoid race conditions.
  • Improve comments on submit methods to clarify the behavior when the pool is stopped.
  • Refactor trySubmit method to make it simpler and more clear.
  • Centralize worker launch in a new method called launchWorker.
  • Replace subpoolSubmit with subpoolWorker method.
  • Add methods to submit individual tasks in a non-blocking fashion (TrySubmit and TrySubmitErr). Requested in #103
  • Expose new DroppedTasks metric that reflects the number of tasks that were not executed because the queue was full. Issue reported in #100
  • SubmittedTasks metric now includes dropped tasks and it stops being updated once the pool is stopped.

Fixes

  • Decrement workerCount counter when the pool context is cancelled.
  • Resize() now supports setting maxConcurrency to 0 (no limit)

Full Changelog: v2.3.0...v2.3.1

0