'Returns received DNS resolution request (if any) that has given
prefix/suffix combination (e.g. prefix.<query result>.suffix.domain)'

def pop(self, prefix=None, suffix=None):

    retVal = None
    with self._lock:
        for _ in self._requests:
            if (((prefix is None) and (suffix is None)) or re.search(('%s\\..+\\.%s' % (prefix, suffix)), _, re.I)):
                retVal = _
                self._requests.remove(_)
                break
    return retVal
