Return a deferred that will be fired when the event is fired.

def wait(self):
        """
        Return a deferred that will be fired when the event is fired.
        """
        d = defer.Deferred()
        if self._result is None:
            self._waiters.append(d)
        else:
            self._fire_deferred(d)
        return d