worker: assign missing deprecation code
PR-URL: https://github.com/nodejs/node/pull/28395 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This commit is contained in:
parent
46a73b9409
commit
f5f8a18831
@ -232,7 +232,7 @@ class Worker extends EventEmitter {
|
|||||||
process.emitWarning(
|
process.emitWarning(
|
||||||
'Passing a callback to worker.terminate() is deprecated. ' +
|
'Passing a callback to worker.terminate() is deprecated. ' +
|
||||||
'It returns a Promise instead.',
|
'It returns a Promise instead.',
|
||||||
'DeprecationWarning', 'DEP0XXX');
|
'DeprecationWarning', 'DEP0132');
|
||||||
this.once('exit', (exitCode) => callback(null, exitCode));
|
this.once('exit', (exitCode) => callback(null, exitCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ process.nextTick(() => {
|
|||||||
common.expectWarning(
|
common.expectWarning(
|
||||||
'DeprecationWarning',
|
'DeprecationWarning',
|
||||||
'Passing a callback to worker.terminate() is deprecated. ' +
|
'Passing a callback to worker.terminate() is deprecated. ' +
|
||||||
'It returns a Promise instead.', 'DEP0XXX');
|
'It returns a Promise instead.', 'DEP0132');
|
||||||
|
|
||||||
w.on('message', common.mustCall(() => {
|
w.on('message', common.mustCall(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user