Skip to content

Commit

Permalink
Use multi-threaded spinner to fix blocking calls
Browse files Browse the repository at this point in the history
  • Loading branch information
arturotorresg committed Sep 19, 2017
1 parent cf617ee commit a892061
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uav_abstraction_layer/src/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Backend::Backend(grvc::utils::ArgumentParser& _args) {
ros::init(_args.argc(), _args.argv(), "ual_" + std::to_string(robot_id));
// Make communications spin!
spin_thread_ = std::thread([this]() {
ros::spin();
ros::MultiThreadedSpinner spinner(2); // Use 2 threads
spinner.spin();
});
}
}
Expand Down

0 comments on commit a892061

Please sign in to comment.