Skip to content

Asynchronously shutting down while using rclcpp::spin rclcpp:spin_some in another thread throws an exception #1139

@ivanpauno

Description

@ivanpauno

This nightly failure is an example of the problem:

What is happening is that one thread is creating an executor, while other is trying to shutdown.
If shutdown is called before the creation of the Executor, an exception is thrown:

void TearDown() override
{
rclcpp::shutdown();
spinner_.join();
}
void spin()
{
while (rclcpp::ok()) {
rclcpp::spin_some(lifecycle_node_->get_node_base_interface());
rclcpp::spin_some(lifecycle_client_);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions