code: def get(self, block=1, delay=None):
          
          if _debug: IOQueue._debug("get block=%r delay=%r", block, delay)
  
          # if the queue is empty and we do not block return None
          if not block and not self.notempty.isSet():
              if _debug: IOQueue._debug("    - not blocking and empty")
              return None
  
          # wait for something to be in the queue
          if delay:
              self.notempty.wait(delay)
              if not self.notempty.isSet():
                  return None
          else:
              self.notempty.wait()
  
          # extract the first element
          priority, iocb = self.queue[0]
          del self.queue[0]
          iocb.ioQueue = None
  
          # if the queue is empty, clear the event
          qlen = len(self.queue)
          if not qlen:
              self.notempty.clear()
  
          # return the request
          return iocb
docs: Get a request from a queue, optionally block until a request
          is available.