Lines Matching refs:worker
51 RoundRobinHandle.prototype.add = function(worker, send) {
52 assert(this.all.has(worker.id) === false);
53 this.all.set(worker.id, worker);
65 this.handoff(worker); // In case there are connections pending.
78 RoundRobinHandle.prototype.remove = function(worker) {
79 const existed = this.all.delete(worker.id);
84 this.free.delete(worker.id);
110 const { 0: workerId, 1: worker } = workerEntry;
112 this.handoff(worker);
116 RoundRobinHandle.prototype.handoff = function(worker) {
117 if (!this.all.has(worker.id)) {
124 this.free.set(worker.id, worker); // Add to ready queue again.
132 sendHelper(worker.process, message, handle, (reply) => {
138 this.handoff(worker);