Skip to content

EventsExecutor: Handle async callbacks for services and subscriptions (backport #1478)#1513

Closed
mergify[bot] wants to merge 1 commit intojazzyfrom
mergify/bp/jazzy/pr-1478
Closed

EventsExecutor: Handle async callbacks for services and subscriptions (backport #1478)#1513
mergify[bot] wants to merge 1 commit intojazzyfrom
mergify/bp/jazzy/pr-1478

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Oct 6, 2025

Description

EventsExecutor was not properly handling async callbacks for services and subscriptions.

Fixes #1473

Is this user-facing behavior change?

No workflow that previously worked with this executor should be impacted at all.

Did you use Generative AI?

F no.

Additional Information

Handling of async callbacks is arguably still not completely correct, as with SingleThreadedExecutor a ReentrantCallbackGroup must be used to enable the executor to do anything else while an async callback is awaiting something, and EventsExecutor ignores all callback groups. However this is still preferable to the previous behavior of exploding with a TypeError, and it sounds like from discussion on the issue that we aren't sure the SingleThreadedExecutor behavior is desirable going forward either.


This is an automatic backport of pull request #1478 done by Mergify.

…#1478)

Closes #1473

Signed-off-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Brad Martin <bmartin@fatlxception.org>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
(cherry picked from commit b99fc95)

# Conflicts:
#	rclpy/test/test_events_executor.py
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Oct 6, 2025

Cherry-pick of b99fc95 has failed:

On branch mergify/bp/jazzy/pr-1478
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit b99fc95.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   rclpy/src/rclpy/events_executor/events_executor.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rclpy/test/test_events_executor.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants