code: def get(self, block=True, timeout=None):
          if not self._data:
              if not block:
                  raise Empty()
              current = compat.getcurrent()
              waketime = None if timeout is None else time.time() + timeout
              if timeout is not None:
                  scheduler.schedule_at(waketime, current)
              self._waiters.append((current, waketime))
              scheduler.state.mainloop.switch()
              if timeout is not None:
                  if not scheduler._remove_timer(waketime, current):
                      self._waiters.remove((current, waketime))
                      raise Empty()
          if self.full() and self._waiters:
              scheduler.schedule(self._waiters.popleft()[0])
          return self._get()