handleWorkerExit(worker) {
        const tasks = worker.withdrawTasks();

        tasks
            .filter(task => task.hasReached(this.options.taskMaxRetries))
            .forEach(task => {
                this.rejectTask(task, new ProcessTerminatedError('cancel after ' + task.retries + ' retries!'))
            });

        tasks
            .filter(task => !task.hasReached(this.options.taskMaxRetries))
            .forEach(task => {
                task.incrementRetries();
                this.pendingTasksQueue.enqueue(task);
            });

        this.workersQueue.remove(worker);

        setImmediate(() => {
            if (this.canStartWorker()) this.startWorker();
        });

        this.processQueue();
    }
When a child exits, check if there are any outstanding tasks and put them in the pending queue.

@private
@param {Worker} worker