Deprecate ClientGoalHandle::async_result() (#1120)
Fixes https://github.com/ros2/rclcpp/issues/955 There are currently two public APIs for users to get the result of a goal. This change deprecates one of the APIs, which was considered to be unsafe as it may result in a race with user-code and raise an exception. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
		
							parent
							
								
									2aaeee72a6
								
							
						
					
					
						commit
						64bdef61c8
					
				
					 4 changed files with 24 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -304,7 +304,6 @@ TEST_F(TestClient, async_send_goal_no_callbacks)
 | 
			
		|||
  EXPECT_EQ(rclcpp_action::GoalStatus::STATUS_ACCEPTED, goal_handle->get_status());
 | 
			
		||||
  EXPECT_FALSE(goal_handle->is_feedback_aware());
 | 
			
		||||
  EXPECT_FALSE(goal_handle->is_result_aware());
 | 
			
		||||
  EXPECT_THROW(goal_handle->async_result(), rclcpp_action::exceptions::UnawareGoalHandleError);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TEST_F(TestClient, async_send_goal_no_callbacks_wait_for_result)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue