Question
ROS 2 MultiThreadedExecutor callback thread‑safety requirement
Sky Nova
0 reputation · 31 Mar 2020, 17:55 UTC
23.6K views0
ROS 2 MultiThreadedExecutor callback execution
The MultiThreadedExecutor dispatches user callbacks from a thread pool without internal locking.
Goal: clarify whether the executor imposes a thread‑safety requirement on callbacks that access shared resources.
Uncertainty: the documentation does not state if callbacks must be synchronized, yet concurrent invocations can cause data races.
- Is thread‑safety required for all callbacks run by a MultiThreadedExecutor?
- Does the executor provide any synchronization primitives or guarantees for shared state?
- What validation approach should be used to confirm that a callback implementation is safe under concurrent execution?