Skip to content

Support events-based executors in DrainWaitable - #54

Merged
otamachan merged 1 commit into
mainfrom
fix/events-executor-drain-waitable
Jun 26, 2026
Merged

Support events-based executors in DrainWaitable#54
otamachan merged 1 commit into
mainfrom
fix/events-executor-drain-waitable

Conversation

@otamachan

Copy link
Copy Markdown
Owner

CoContext::post() defers work onto a DrainWaitable guard condition, but its set_on_ready_callback() was a no-op. Events-based executors (EventsExecutor / EventsCBGExecutor) learn a waitable is ready only through that callback, never by polling the wait set, so posted resumptions were dropped. A coroutine suspended in send_goal (whose goal_response_callback resumes via post()) then hung forever.

Forward the guard condition's trigger notifications to the on-ready callback. GuardCondition replays triggers that raced ahead of registration, so no post() is lost.

Add a regression test that drives send_goal under a single-threaded EventsCBGExecutor. CI now also builds against lyrical (Ubuntu 26.04).

CoContext::post() defers work onto a DrainWaitable guard condition, but
its set_on_ready_callback() was a no-op. Events-based executors
(EventsExecutor / EventsCBGExecutor) learn a waitable is ready only
through that callback, never by polling the wait set, so posted
resumptions were dropped. A coroutine suspended in send_goal (whose
goal_response_callback resumes via post()) then hung forever.

Forward the guard condition's trigger notifications to the on-ready
callback. GuardCondition replays triggers that raced ahead of
registration, so no post() is lost.

Add a regression test that drives send_goal under a single-threaded
EventsCBGExecutor. It is skipped where EventsCBGExecutor is unavailable
(rolling on noble, rclcpp 31.x). CI now also builds against lyrical
(Ubuntu 26.04).

Claude-Session: https://claude.ai/code/session_01WY7MQS2YtHghAxhhv7wsG1
@otamachan
otamachan merged commit 8d6cd20 into main Jun 26, 2026
6 checks passed
@otamachan
otamachan deleted the fix/events-executor-drain-waitable branch June 26, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant