Skip to content
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

Implement WorkerPool for efficient worker management in parallel processing #7

Merged
merged 5 commits into from
Jan 2, 2025

Conversation

ahmadileham
Copy link

  • Introduced a WorkerPool class to manage and reuse workers, reducing overhead from frequent creation and termination.
  • Refactored _spawnWorker to leverage the WorkerPool, enhancing performance and scalability.
  • Updated the Parallel constructor to initialize the WorkerPool with a configurable maxWorkers setting.
  • Simplified error handling and added more descriptive error messages for easier debugging.
  • Reduced redundant logic across worker management, making the codebase cleaner and more maintainable.

@ahmadileham ahmadileham merged commit f7ef93e into main Jan 2, 2025
5 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