'Dispatch more data for parallel processing
This method is meant to be called concurrently by the multiprocessing
callback. We rely on the thread-safety of dispatch_one_batch to protect
against concurrent consumption of the unprotected iterator.'

def dispatch_next(self):

    if (not self.dispatch_one_batch(self._original_iterator)):
        self._iterating = False
        self._original_iterator = None
