Skip to content

Commit

Permalink
Add Executor::spin_some
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie Kay committed Aug 13, 2015
1 parent 872edfc commit 5a704c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rclcpp/include/rclcpp/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,17 @@ class Executor
void spin_node_some(rclcpp::node::Node::SharedPtr & node)
{
this->add_node(node, false);
// non-blocking = true
spin_some();
this->remove_node(node, false);
}

virtual void spin_some()
{
while (AnyExecutable::SharedPtr any_exec =
get_next_executable(std::chrono::milliseconds::zero()))
{
execute_any_executable(any_exec);
}
this->remove_node(node, false);
}

// Support dynamic switching of memory strategy
Expand Down

0 comments on commit 5a704c7

Please sign in to comment.