src/workers/workerpool.js
function Worker(file) {
  if (!(this instanceof Worker))
    return new Worker(file);

  EventEmitter.call(this);

  this.id = -1;
  this.framer = new Framer();
  this.parser = new Parser();
  this.pending = new Map();

  this.child = new Child(file);

  this.init();
}
function Worker(file) {
  if (!(this instanceof Worker))
    return new Worker(file);

  EventEmitter.call(this);

  this.id = -1;
  this.framer = new Framer();
  this.parser = new Parser();
  this.pending = new Map();

  this.child = new Child(file);

  this.init();
}
function Worker ( file ) { if ( ! ( this instanceof Worker ) ) return new Worker ( file ) ; EventEmitter . call ( this ) ; this . id = - 1 ; this . framer = new Framer ( ) ; this . parser = new Parser ( ) ; this . pending = new Map ( ) ; this . child = new Child ( file ) ; this . init ( ) ; }
Represents a worker.
@alias module:workers.Worker
@constructor
@param {String} file
Represents a worker .