Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for timer/srv-server finalization issue 2283 #2284

Open
wants to merge 4 commits into
base: noetic-devel
Choose a base branch
from

Commits on Sep 28, 2022

  1. CallbackQueue removeByID blocks unless callback self-removes (ros#2283)

    Making sure currently executing callback finishes before removing
    thread returns from removeByID allows to avoid race condition in
    a case when e.g. ros::Timer held in a class and capturing `this`
    is stopped just before destruction of the class and its data members:
    https://github.com/aurzenligl/study/blob/master/ros-timer/src/race.cpp
    aurzenligl committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    9dcf927 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    35aab20 View commit details
    Browse the repository at this point in the history
  3. Fix for testcase assuming non-blocking removeByID (ros#2283)

    Rationale for the testcase was the following deadlock scenario:
    https://gist.github.com/iwanders/ede48fb649fd47f9b1f9a52c527b463c
    
    Changed testcase presents how the same scenario can be carried
    out with blocking removeByID (with exception for self-removal).
    The external mutex from the scenario must be unlocked for the
    call of ros::Timer::stop, otherwise scenario stays as it is.
    External thread returns from removeByID once cb call finishes,
    spinner thread returns immediately.
    aurzenligl committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    25fb5a8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6f31e62 View commit details
    Browse the repository at this point in the history