File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const dgram = require('dgram');
6
6
const fork = require ( 'child_process' ) . fork ;
7
7
const net = require ( 'net' ) ;
8
8
const util = require ( 'util' ) ;
9
+ const internalUtil = require ( 'internal/util' ) ;
9
10
const SCHED_NONE = 1 ;
10
11
const SCHED_RR = 2 ;
11
12
@@ -30,14 +31,14 @@ function Worker(options) {
30
31
this . exitedAfterDisconnect = undefined ;
31
32
32
33
Object . defineProperty ( this , 'suicide' , {
33
- get : function ( ) {
34
- // TODO: Print deprecation message.
34
+ get : internalUtil . deprecate ( ( ) => {
35
35
return this . exitedAfterDisconnect ;
36
- } ,
37
- set : function ( val ) {
38
- // TODO: Print deprecation message.
36
+ } , 'worker.suicide is deprecated. ' +
37
+ 'Please use worker.exitedAfterDisconnect.' ) ,
38
+ set : internalUtil . deprecate ( ( val ) => {
39
39
this . exitedAfterDisconnect = val ;
40
- } ,
40
+ } , 'worker.suicide is deprecated. ' +
41
+ 'Please use worker.exitedAfterDisconnect.' ) ,
41
42
enumerable : true
42
43
} ) ;
43
44
You can’t perform that action at this time.
0 commit comments