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

feat: Add Piscina#close API #396

Merged
merged 9 commits into from
Sep 10, 2023

Conversation

andersonjoseph
Copy link
Contributor

Hi everyone!

This PR adds a new method called close(). It allows you to stop all the workers in a pool gracefully (closes: #139)

Please let me know if you have any feedback or suggestions for improvement. I'm happy to make any changes if needed.

@metcoder95 metcoder95 changed the title Graceful Shutdowns feat: Graceful Shutdowns Aug 31, 2023
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Sorry for the fast review but it kept my attention as I was working on the same feature 😅

src/index.ts Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
test/pool-close.ts Outdated Show resolved Hide resolved
@andersonjoseph andersonjoseph force-pushed the graceful-close branch 2 times, most recently from 99f11da to 08e995b Compare August 31, 2023 23:23
@andersonjoseph andersonjoseph force-pushed the graceful-close branch 2 times, most recently from 4909721 to 41233ca Compare September 5, 2023 22:12
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Minor comments left 👍

README.md Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🚀
Small nit and we are ready to go

src/index.ts Outdated Show resolved Hide resolved
@metcoder95 metcoder95 changed the title feat: Graceful Shutdowns feat: Add Piscina#close API Sep 10, 2023
@metcoder95 metcoder95 enabled auto-merge (squash) September 10, 2023 10:58
@metcoder95 metcoder95 merged commit 5378e4c into piscinajs:current Sep 10, 2023
3 checks passed
@andersonjoseph andersonjoseph deleted the graceful-close branch September 11, 2023 16: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.

Graceful Shutdowns
2 participants