%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const { ObjectSetPrototypeOf, ReflectApply, } = primordials; const EventEmitter = require('events'); const { kEmptyObject } = require('internal/util'); module.exports = Worker; // Common Worker implementation shared between the cluster primary and workers. function Worker(options) { if (!(this instanceof Worker)) return new Worker(options); ReflectApply(EventEmitter, this, []); if (options === null || typeof options !== 'object') options = kEmptyObject; this.exitedAfterDisconnect = undefined; this.state = options.state || 'none'; this.id = options.id | 0; if (options.process) { this.process = options.process; this.process.on('error', (code, signal) => this.emit('error', code, signal) ); 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; };