(self)
return list(map(heapq.heappop, [events]*len(events)))
An ordered list of upcoming events.

        Events are named tuples with fields for:
            time, priority, action, arguments, kwargs
An ordered list of upcoming events.
An ordered list of upcoming events .
def queue(self):
        """An ordered list of upcoming events.

        Events are named tuples with fields for:
            time, priority, action, arguments, kwargs

        """
        # Use heapq to sort the queue rather than using 'sorted(self._queue)'.
        # With heapq, two events scheduled at the same time will show in
        # the actual order they would be retrieved.
        with self._lock:
            events = self._queue[:]
        return list(map(heapq.heappop, [events]*len(events)))
def queue ( self ) : # Use heapq to sort the queue rather than using 'sorted(self._queue)'. # With heapq, two events scheduled at the same time will show in # the actual order they would be retrieved. with self . _lock : events = self . _queue [ : ] return list ( map ( heapq . heappop , [ events ] * len ( events ) ) )