'Initialize a queue object with a given maximum size.
If `maxsize` is <= 0, the queue size is infinite.'

def __init__(self, maxsize=0):

    self._init(maxsize)
    self.mutex = threading.RLock()
    self.not_empty = threading.Condition(self.mutex)
    self.not_full = threading.Condition(self.mutex)
