Uh oh!
There was an error while loading. Please reload this page.
worker: handle calling terminate when kHandler is null - #28370
worker: handle calling terminate when kHandler is null#28370elyalvarado wants to merge 5 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
77806ac to
c59a793Compare
addaleax
left a comment
There was a problem hiding this comment.
I think you need to run make lint and address the errors, but otherwise this looks good to me :)
Uh oh!
There was an error while loading. Please reload this page.
c59a793 to
4222cd9Compareelyalvarado
commented
Jun 23, 2019
Pushed the following changes:
|
addaleax
commented
Jul 4, 2019
CI (without rebasing due to the merge commit): https://ci.nodejs.org/job/node-test-pull-request/24264/ |
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
commented
Jul 5, 2019
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jul 15, 2019
nodejs-github-bot
commented
Jul 30, 2019
nodejs-github-bot
commented
Jul 30, 2019
Trott
commented
Jul 30, 2019
Can you remove the merge commit? Our Ci does not handle them well. |
This PR makes a change to the Worker.terminate() when called if the kHandler is null. Before this pull request it was returning undefined, but the API is expecting a promise. With the changes in this PR if terminate is called a Promise.resolve() is returned, unless a callback is passed in which case the old behavior stays (returns undefined).
This change makes terminate always return a promise even if kHandler is null
The deprecation warning is printed even if the kHandler is null
...and make the linter happy
fd7f67e to
3916e59CompareTrott
commented
Jul 30, 2019
Rebased against master and force pushed to eliminate the merge commit so we can run Ci and get this landed.... |
nodejs-github-bot
commented
Jul 30, 2019
elyalvarado
commented
Jul 31, 2019
Thanks @Trott I was precisely going to ask how should I eliminate the merge commit. Now I know 😉. You all rock 🎸 |
This PR makes a change to the Worker.terminate() when called if the kHandler is null. Before this pull request it was returning undefined, but the API is expecting a promise. With the changes in this PR if terminate is called a Promise.resolve() is returned, unless a callback is passed in which case the old behavior stays (returns undefined). PR-URL: nodejs#28370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Trott
commented
Jul 31, 2019
Landed in 9083a67. Thanks for the contribution! 🎉 (If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.) |
This PR makes a change to the Worker.terminate() when called if the kHandler is null. Before this pull request it was returning undefined, but the API is expecting a promise. With the changes in this PR if terminate is called a Promise.resolve() is returned, unless a callback is passed in which case the old behavior stays (returns undefined). PR-URL: #28370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This PR makes a change to the Worker.terminate() method when
called if the kHandler is null. Before this pull request it was returning
undefined, but the API is expecting a promise. With the changes in
this PR if terminate is called and kHandler is null a resolved Promise
is returned even if a callback is passed, to be consistent with the API
surface, and with always return promises.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes