ype.remove = function(worker) { if (!this.workers.has(worker.id)) return false; this.workers.delete(worker.id); if (this.workers.size !== 0) return false; this.handle.close(); this.handle = null; return true; };