Skip to content

Fix WorkerPool empty URL list hang - #9

Open
mdipanjan wants to merge 1 commit into
Dhravya:mainfrom
mdipanjan:main
Open

Fix WorkerPool empty URL list hang#9
mdipanjan wants to merge 1 commit into
Dhravya:mainfrom
mdipanjan:main

Conversation

@mdipanjan

Copy link
Copy Markdown
Contributor

Summary

Fixes WorkerPool.pullAll([]) so it resolves immediately when there are no URLs to process.

Previously, an empty URL list created a Promise but dispatched no workers. Since no worker messages could arrive, the Promise never resolved and callers could hang indefinitely.

Change

  • Add an empty-input fast path in WorkerPool.pullAll
  • Resolve immediately when urls.length === 0

Validation

Verified locally that WorkerPool.pullAll([]) now resolves instead of timing out.

@mdipanjan
mdipanjan marked this pull request as ready for review May 8, 2026 02:12
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