ros2_java icon indicating copy to clipboard operation
ros2_java copied to clipboard

MultiThreadedExecutor does not process callbacks asynchronously

Open jacobperron opened this issue 2 years ago • 2 comments

Each callback is guarded by mutex, so even though they are happening in different threads, they are processed in series:

https://github.com/ros2-java/ros2_java/blob/ae5edaa0f07f14938913bb5e395544e3ca4d91c5/rcljava/src/main/java/org/ros2/rcljava/executors/MultiThreadedExecutor.java#L85-L87

I proposed a patch to actually execute callbacks in parallel by default (https://github.com/osrf/ros2_java/pull/86), but @ivanpauno pointed out that it would be more consistent with other client libraries to introduce the concept of callback groups. I agree with this as it would not only be consistent, but make it more flexible to configure the executor.

jacobperron avatar Dec 01 '21 21:12 jacobperron

Is there a ticket yet about supporting callback groups?

scpeters avatar Dec 08 '21 21:12 scpeters

Is there a ticket yet about supporting callback groups?

That's a negative.

jacobperron avatar Jan 06 '22 23:01 jacobperron