code: def set(self):
          
          with self._lock:
              if self._flag:
                  return
              self._flag = True
              with assert_no_switchpoints():
                  run_callbacks(self)
docs: Set the internal flag, and wake up any fibers blocked on :meth:`wait`.