def METHOD_NAME(self, e):
    # returns True if termination has been requested
    try:
        while True:
            result_d, next_operation, _, __ = self._queue.get(block=False)
            if isinstance(next_operation, _TerminateRequest):
                self._queue.task_done()
                reactor.callFromThread(result_d.callback, None)
                return True
            else:
                self._queue.task_done()
                reactor.callFromThread(result_d.errback, e)
    except queue.Empty:
        return False