You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The std::future::get() function can only be called once as it will invalidate the std::future after it's called. In this code, future_result.get() is called multiple times.
The text was updated successfully, but these errors were encountered:
std::shared_future solves the issue. I was looking at the outdated demo version in Foxy branch, which uses auto future_result = client_get_state->async_send_request(request);
https://github.com/ros2/demos/blob/69aa0e4d8662b7bd06138462cc328415b3198263/lifecycle/src/lifecycle_service_client.cpp#L124C25-L124C38
The std::future::get() function can only be called once as it will invalidate the std::future after it's called. In this code, future_result.get() is called multiple times.
The text was updated successfully, but these errors were encountered: