Client response with loop vs spin_until_future_complete
Hello all, I'm new in ROS2 and I have a question about asynchronous client. In the examples I saw the usage of construction like this:
while not future.done():
#sleep in some way
and in other I saw the usage of spin_until_future_complete.
self.future = self.cli.call_async(self.req)
rclpy.spin_until_future_complete(self, self.future)
Is there some way to get an event that indicates the call is done? Thank you in advance!