def set(self):
        """Set event flag to true and resolve future(s) returned by until_set()

        Notes
        -----
        A call to set() may result in control being transferred to
        done_callbacks attached to the future returned by until_set().

        """
        self._flag = True
        old_future = self._waiting_future
        # Replace _waiting_future with a fresh one incase someone woken up by set_result()
        # sets this AsyncEvent to False before waiting on it to be set again.
        self._waiting_future = tornado_Future()
        old_future.set_result(True)