-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
worker: remove redundant function call to setupPortReferencing
in setupChild
#22298
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
|
||
// This test makes sure that we manipulate the references of | ||
// `parentPort` correctly so that the worker threads will | ||
// automatically exit when there are no any other references. |
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.
-any
const { isMainThread, parentPort, Worker } = require('worker_threads'); | ||
|
||
// This test makes sure that we manipulate the references of | ||
// `parentPort` correctly so that the worker threads will |
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.
s/threads/thread
assert.strictEqual(code, 0); | ||
}), 1); | ||
|
||
worker.on('online', common.mustCall(() => {}, 1)); |
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.
Nit: the 1
with common.mustCall is obsolete as the default is 1.
This PR needs a rebase against master to avoid the git failure in the CI. |
in `setupChild` There is no need to call `setupPortReferencing` in `setupChild` as which has been called with the same arguments in the `oninit` prototype method of `MessagePort`.
@joyeecheung The travis CI is green now. PTAL. |
Landed in 3b5c992, thanks for the PR! 🎉 |
There is no need to call `setupPortReferencing` in `setupChild` as which has been called with the same arguments in the `oninit` prototype method of `MessagePort`. PR-URL: #22298 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
There is no need to call `setupPortReferencing` in `setupChild` as which has been called with the same arguments in the `oninit` prototype method of `MessagePort`. PR-URL: #22298 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
There is no need to call `setupPortReferencing` in `setupChild` as which has been called with the same arguments in the `oninit` prototype method of `MessagePort`. PR-URL: #22298 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
There is no need to call
setupPortReferencing
insetupChild
as which has been called with the same arguments in theoninit
prototype method ofMessagePort
.make -j4 test
(UNIX), orvcbuild test
(Windows) passes