'Remove and return an item from the queue.
If optional args `block` is True and `timeout` is None (the
default), block if necessary until an item is available. If
`timeout` is a positive number, it blocks at most `timeout`
seconds and raises the ``Empty`` exception if no item was
available within that time.  Otherwise (`block` is false),
return an item if one is immediately available, else raise the
``Empty`` exception (`timeout` is ignored in that case).'

def get(self, block=True, timeout=None):

    self.not_empty.acquire()
    try:
        if (not block):
            if self._empty():
                raise Empty
        elif (timeout is None):
            while self._empty():
                self.not_empty.wait()
        else:
            if (timeout < 0):
                raise ValueError("'timeout'    must    be    a    positive    number")
            endtime = (_time() + timeout)
            while self._empty():
                remaining = (endtime - _time())
                if (remaining <= 0.0):
                    raise Empty
                self.not_empty.wait(remaining)
        item = self._get()
        self.not_full.notify()
        return item
    finally:
        self.not_empty.release()
