code: def unqueue(self, timeout=10, should_wait=False):
          
          start, now = time.time(), time.time()
          wait = self.queue.empty() and should_wait
  
          while (not self.queue.empty() or wait) and (now - start) < timeout:
              if wait and self.queue.empty():
                  time.sleep(0.25)
                  now = time.time()
              else:
                  result = self.queue.get(False)
                  self.log.debug('unqueue: result received\n%s', result)
                  if result and result != "nil":
                      wait = None
                      # Restart timeout
                      start, now = time.time(), time.time()
                      _json = json.loads(result)
                      # Watch out, it may not have callId
                      call_id = _json.get("callId")
                      if _json["payload"]:
                          self.handle_incoming_response(call_id, _json["payload"])
                  else:
                      self.log.debug('unqueue: nil or None received')
  
          if (now - start) >= timeout:
              self.log.warning('unqueue: no reply from server for %ss', timeout)
docs: Unqueue all the received ensime responses for a given file.