class_docstr: A thread that executes a function and catches all soft interrupts.
  Users very often Ctrl-C to stop the program multiple times which leaves
  program no chance to clean up.
class_docstr_tok: ["A","thread","that","executes","a","function","and","catches","all","soft","interrupts",".","Users","very","often","Ctrl-C","to","stop","the","program","multiple","times","which","leaves","program","no","chance","to","clean","up","."]
code: def join(self):
      while True:
          try:
              # Pressing Ctrl-C will raise KeyboardInterrupt and stop only
              # the `Event.wait()` call. The target function of `RobustExec`
              # will continue to run, until stop_signal is set.
              return self.stop_signal.wait()
          except KeyboardInterrupt:
              logger.warning("Received Ctrl-C. Closing gracefully.")
  
file_path: aim/aim/ext/cleanup/__init__.py
imports: import time
  from abc import abstractmethod
  import atexit
  import weakref
  import logging
  import threading
  from typing import Generic, Tuple, TypeVar, Dict
label_desc: Use image node_id 2 for calling the RobustExec obj's underlying member method code with example usage: obj.join() and returns: self