'Usage:
with stream_id_gen.get_next(n) as stream_ids:
# ... persist events ...'

def get_next_mult(self, n):

    with self._lock:
        next_ids = range((self._current + self._step), (self._current + (self._step * (n + 1))), self._step)
        self._current += (n * self._step)
        for next_id in next_ids:
            self._unfinished_ids.append(next_id)
    @contextlib.contextmanager
    def manager():
        try:
            (yield next_ids)
        finally:
            with self._lock:
                for next_id in next_ids:
                    self._unfinished_ids.remove(next_id)
    return manager()
