Skip to content

Wrong place to insert the lock? #1959

Closed
@yashi

Description

@yashi

The PR #1599 which backports #1451 failed to insert the lock in the right place.

const auto hardware_info = hardware_interface::parse_control_resources_from_urdf(urdf);
if (load_and_initialize_components)
std::lock_guard<std::recursive_mutex> resource_guard(resources_lock_);
{
for (const auto & individual_hardware_info : hardware_info)

This means that when load_and_initialize_components is true the lock is taken, but the rest of the block will be executed regardless.
Or, is it intended fix?

@destogl Please confirm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions