'Cleanup after any worker processes which have exited due to reaching
their specified lifetime.  Returns True if any workers were cleaned up.'

def _join_exited_workers(self):

    cleaned = False
    for i in reversed(range(len(self._pool))):
        worker = self._pool[i]
        if (worker.exitcode is not None):
            debug(('cleaning    up    worker    %d' % i))
            worker.join()
            cleaned = True
            del self._pool[i]
    return cleaned
