def get(self, block=1, delay=None):
    'Get a request from a queue, optionally block until a request\n        is available.'
    if _debug:
        IOQueue._debug('get block=%r delay=%r', block, delay)
    if ((not block) and (not self.notempty.isSet())):
        return None
    if delay:
        self.notempty.wait(delay)
        if (not self.notempty.isSet()):
            return None
    else:
        self.notempty.wait()
    (priority, iocb) = self.queue[0]
    del self.queue[0]
    iocb.ioQueue = None
    qlen = len(self.queue)
    if (not qlen):
        self.notempty.clear()
    return iocb
Get a request from a queue, optionally block until a request
is available.
def get(self, block=1, delay=None):
    'Get a request from a queue, optionally block until a request\n        is available.'
    if _debug:
        IOQueue._debug('get block=%r delay=%r', block, delay)
    if ((not block) and (not self.notempty.isSet())):
        return None
    if delay:
        self.notempty.wait(delay)
        if (not self.notempty.isSet()):
            return None
    else:
        self.notempty.wait()
    (priority, iocb) = self.queue[0]
    del self.queue[0]
    iocb.ioQueue = None
    qlen = len(self.queue)
    if (not qlen):
        self.notempty.clear()
    return iocb