Skip to content

Commit 37b23e1

Browse files
committed
Put close worker back. No longer reused
1 parent 13ada90 commit 37b23e1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/runtime/parallel/coordinator.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,12 @@ export default class Coordinator {
258258
return null
259259
}
260260

261-
closeWorker(worker: IWorker): void {
262-
worker.idle = false
263-
const finalizeCommand: IWorkerCommand = { finalize: true }
264-
worker.process.send(finalizeCommand)
265-
}
266-
267261
giveWork(worker: IWorker): void {
268262
if (this.nextPickleIdIndex >= this.pickleIds.length) {
269-
this.closeWorker(worker)
263+
worker.idle = false
264+
const finalizeCommand: IWorkerCommand = { finalize: true }
265+
worker.process.send(finalizeCommand)
266+
return
270267
}
271268

272269
const picklePlacement = this.nextPicklePlacement()

0 commit comments

Comments
 (0)