ros2 / ros2/rclcpp

Implement a `max_events` policy for the `EventsCBGExecutor`

Open
#3,213 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

Description

Implement a max_events option, which will (at the minimum) warn the user if the number of ready events in the queue exceeds this amount and optionally prevent the queue from growing unbounded.

Motivation

Currently, using the EventsCBGExecutor can result in unbounded memory growth if the system is slowed down and ready, un-serviced events stack up in the queue.

Design / Implementation Considerations

What is the desired behavior if we reach max_events? Would we want the policy to be user-configurable (don't accept new events, remove the oldest event, do nothing but warn)?

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the EventsCBGExecutor entry point and inspecting how ready events are queued and serviced. Clarify whether max_events should warn, reject new events, remove old events, or support a configurable policy. The work is complete when the chosen behavior prevents or reports unbounded queue growth.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
robotics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.