def get(self, block=True, timeout=None):
        self.not_empty.acquire()
        try:
            if not block:
                if not self._qsize():
                    raise Empty
            elif timeout is None:
                while not self._qsize():
                    self.not_empty.wait()
            elif timeout < 0:
                raise ValueError("'timeout' must be a positive number")
            else:
                endtime = _time() + timeout
                while not self._qsize():
                    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()
This function will fix the bug reported at
dataset/ETHPy150Open ooici/pyon/pyon/util/threading.py/Queue.get--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/http/utils.py/fix_IE_for_vary