'Queue the batch for computing, with or without multiprocessing
WARNING: this method is not thread-safe: it should be only called
indirectly via dispatch_one_batch.'

def _dispatch(self, batch):

    if self._aborting:
        return
    self.n_dispatched_tasks += len(batch)
    self.n_dispatched_batches += 1
    dispatch_timestamp = time.time()
    cb = BatchCompletionCallBack(dispatch_timestamp, len(batch), self)
    job = self._backend.apply_async(batch, callback=cb)
    self._jobs.append(job)
