'Pop and return a list of all ready (task, future) tuples'

def pop_ready(self):

    ready_tasks = []
    while (self._tasks and (self._tasks[0][0] < time.time())):
        try:
            task = self._pop_next()
        except KeyError:
            break
        ready_tasks.append(task)
    return ready_tasks
