# Path: sockjs/cyclone/utils.py
# class PriorityQueue(object):
#     """ Simplistic priority queue.
#     """
#     def __init__(self):
#         self._queue = []
# 
#         self.counter = itertools.count()   # needed to preserve insertion order
#                                            # in elements with the same priority
# 
#     def push(self, el):
#         """ Put a new element in the queue. """
#         count = next(self.counter)
#         heapq.heappush(self._queue, (el, count))
# 
#     def peek(self):
#         """ Returns the highest priority element from the queue without
#         removing it. """
#         return self._queue[0][0]
#     
#     def pop(self):
#         """ Remove and returns the highest priority element form the queue. """
#         return heapq.heappop(self._queue)[0]
# 
#     def is_empty(self):
#         """ Checks if the queue is empty. """
#         return not self._queue
#     
#     def __contains__(self, el):
#         return el in ( e[0] for e in self._queue )
# 
#     def __len__(self):
#         return len(self._queue)


import time
from sockjs.cyclone.utils import PriorityQueue



class SessionContainer(object):
    """ Session container object. """
    def __init__(self):
        self._items = dict()

# Path: sockjs/cyclone/utils.py
# class PriorityQueue(object):
#     """ Simplistic priority queue.
#     """
#     def __init__(self):
#         self._queue = []
# 
#         self.counter = itertools.count()   # needed to preserve insertion order
#                                            # in elements with the same priority
# 
#     def push(self, el):
#         """ Put a new element in the queue. """
#         count = next(self.counter)
#         heapq.heappush(self._queue, (el, count))
# 
#     def peek(self):
#         """ Returns the highest priority element from the queue without
#         removing it. """
#         return self._queue[0][0]
#     
#     def pop(self):
#         """ Remove and returns the highest priority element form the queue. """
#         return heapq.heappop(self._queue)[0]
# 
#     def is_empty(self):
#         """ Checks if the queue is empty. """
#         return not self._queue
#     
#     def __contains__(self, el):
#         return el in ( e[0] for e in self._queue )
# 
#     def __len__(self):
#         return len(self._queue)


# Path: sockjs/cyclone/sessioncontainer.py
import time
from sockjs.cyclone.utils import PriorityQueue




class SessionContainer(object):
    """ Session container object. """
    def __init__(self):
        self._items = dict()

        self._queue = PriorityQueue()