Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
exit workers gracefully #8206
exit workers gracefully #8206
Changes from all commits
bf6848a
910f170
c955f4d
e78201d
a696764
045c54d
a39e37c
1b6eddf
88b75e2
b6dc28c
1fbbcc7
181344a
9dd0886
b92d32f
f9139f4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stderr instead? not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno, last time I added a warning was
jest-circus/jest-jasmine2
which also usedconsole.log(chalk.yellow())
. You know the code base better than I do, what is more commonly used for warnings? 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be considered a breaking change or not (thus should only land in 25).
(I know I asked you to make it async, but changing the return type to be a promise, async fn or not, is a change in signature)
25 shouldn't be far out, thoughts on holding off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I'm not sure about the change from throw to reject you asked me to make.
The argument was that it's annoying if a function can both throw and reject.
I think that this function should only ever throw, never reject. It has the case of invalid usage (
end()
called multiple times), but it should never "fail to end" the pool. If there's no other way,SIGKILL
everything. It should always be able to clean up.If we'd revert that back then it's definitely not breaking because the workers were always
end
ed asynchronously, there was just no way to find out when that happened (and the signature itself is backward compatible).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SimenB would you be fine with changing this back? I think calling this with invalid preconditions should throw immediately and not worst case even result in an uncaught rejection