MCPcopy Create free account
hub / github.com/TeleHuman/TextOp / destroy_node

Method destroy_node

TextOpDeploy/src/textop_ctrl/scripts/rmdar.py:580–596  ·  view source on GitHub ↗

Override destroy_node to clean up threads

(self)

Source from the content-addressed store, hash-verified

578 self.get_logger().info("Keyboard input thread exiting")
579
580 def destroy_node(self):
581 """Override destroy_node to clean up threads"""
582 self.get_logger().info("Shutting down MotionDAR node...")
583
584 # Signal thread to shutdown
585 if self._shutdown_event:
586 self._shutdown_event.set()
587
588 # Wait for thread to finish (with timeout)
589 if self._keyboard_thread and self._keyboard_thread.is_alive():
590 self._keyboard_thread.join(timeout=1.0)
591 if self._keyboard_thread.is_alive():
592 print(
593 "Warning: Keyboard input thread did not shutdown gracefully"
594 )
595
596 super().destroy_node()
597
598
599

Callers 3

mainFunction · 0.95
mainFunction · 0.80
mainFunction · 0.80

Calls 1

setMethod · 0.80

Tested by

no test coverage detected