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 "roscpp multithreaded spinners eat up CPU when callbacks take too long" #2377

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

Commits on Oct 7, 2024

  1. * Fix a busy-wait loop in subscription queue.

    * Better fix for slow callbacks CPU throttling.
    
    * More versatile callback queue test.
    
    * Finished cherry-pick merge to melodic-devel.
    
    * libros: moved define
    
    * roscpp: implementet ros#1608 without ABI/API breaks
    
    * /test_roscpp: fake_message is in a header now...
    
    * test_roscpp: fixed sign-compare warning
    
    * stabilized test
    
    * CallbackQueue: use SteadyTime instead of WallTime to get independent of system-time changes
    
    * style only
    
    * Update clients/roscpp/include/ros/callback_queue.h
    
    Co-authored-by: Johannes Meyer <[email protected]>
    
    Co-authored-by: Martin Pecka <[email protected]>
    Co-authored-by: CTU base <robot@ctu-base>
    Co-authored-by: Martin Pecka <[email protected]>
    Co-authored-by: Christopher Wecht <christopher.wechtstudent.kit.edu>
    Co-authored-by: Dirk Thomas <[email protected]>
    Co-authored-by: Johannes Meyer <[email protected]>
    6 people committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    a60cca0 View commit details
    Browse the repository at this point in the history
  2. Fix subscription busy wait melodic (ros#2014)

    * roscpp: simplify implementation of CallbackQueue::callOne()
    
    Replace duplicate wait_for() call in CallbackQueue::callOne() with a loop and a call to wait_until().
    
    * roscpp: return TryAgain from CallbackQueue::callOne(timeout) immediately if timeout.isZero()
    
    ... and if none of the other result conditions holds (i.e. the queue is Empty or Disabled).
    
    Co-authored-by: Johannes Meyer <[email protected]>
    dirk-thomas and meyerj committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    df10b21 View commit details
    Browse the repository at this point in the history