nal), ); this.process.on('message', (message, handle) => this.emit('message', message, handle), ); } } ObjectSetPrototypeOf(Worker.prototype, EventEmitter.prototype); ObjectSetPrototypeOf(Worker, EventEmitter); Worker.prototype.kill = function() { ReflectApply(this.destroy, this, arguments); }; Worker.prototype.send = function() { return ReflectApply(this.process.send, this.process, arguments); }; Worker.prototype.isDead = function() { return this.process.exitCode != null || this.process.signalCode != null; }; Worker.prototype.isConnected = function() { return this.process.connected; };