const previousWorkerIndex = this.tasks.get(worker)
if (previousWorkerIndex !== undefined) {
this.tasks.set(worker, previousWorkerIndex + 1)
} else {
throw Error('Worker could not be found in tasks map')
}
const previousWorkerIndex = this.tasks.get(worker)
if (previousWorkerIndex !== undefined) {
this.tasks.set(worker, previousWorkerIndex + 1)
} else {
throw Error('Worker could not be found in tasks map')
}