Skip to content

Improve EventGenerator lifecycle clarity and control #3420

@souro26

Description

@souro26

Right now EventGenerator keeps track of its state internally (_active, _current_event, execution count), but that state isn’t clearly exposed or separated in the public API.

Current Limitations

  1. There’s no clean way to see when the next execution will happen.
  2. The only lifecycle controls are start() and stop(), which makes temporary suspension awkward.

In more complex models, this makes the generator harder to reason about and sometimes pushes users to inspect private attributes.

Proposed direction

  1. Add simple introspection properties like next_scheduled_time.
  2. Based on that, add explicit lifecycle control such as pause() and resume().

The goal is to make the generator’s state easier to understand and work with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions