def shutdown(self): """Shutdown this context.""" # imported locally to avoid loading extensions on module import from rclpy.impl.implementation_singleton import rclpy_implementation with self._lock: rclpy_implementation.rclpy_shutdown(self._handle) self._call_on_shutdown_callbacks()
def try_shutdown(self): """Shutdown this context, if not already shutdown.""" # imported locally to avoid loading extensions on module import from rclpy.impl.implementation_singleton import rclpy_implementation with self._handle as capsule, self._lock: if rclpy_implementation.rclpy_ok(capsule): rclpy_implementation.rclpy_shutdown(capsule) self._call_on_shutdown_callbacks()
def try_shutdown(): """Shutdown rclpy if not already shutdown.""" # imported locally to avoid loading extensions on module import from rclpy.impl.implementation_singleton import rclpy_implementation with g_shutdown_lock: if rclpy_implementation.rclpy_ok(): return rclpy_implementation.rclpy_shutdown()
def shutdown(): # imported locally to avoid loading extensions on module import from rclpy.impl.implementation_singleton import rclpy_implementation with g_shutdown_lock: return rclpy_implementation.rclpy_shutdown()
def shutdown(): return _rclpy.rclpy_shutdown()
def shutdown(): return _rclpy.rclpy_shutdown()