code: def request(self, action):
      
      ev = threading.Event()
      first = False
      with self.__lock:
        if len(self.__events) == 0:
          first = True
        self.__events.append(ev)
      if first:
        action()
      return ev
docs: Request an action to be performed, in case one.