Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simplify Agent.state.paused, Agent.state.stopped, Agent. _external_pause_event #1716

@pirate

Description

@pirate

This is the next step to clean up the Ctrl+C / Agent stopping, pausing, and resuming code.

  • determine if we even need Agent.state.paused anymore now that we are using a threadsafe Agent._external_pause_event semaphore. I think we should simply that to just the semaphore and store it in Agent.state
  • we should review the code to see if all these methods and state attrs really need to be separate, or if we can merge them somehow all into one pair of methods & one state attr:
    • Agent.pause()/Agent.resume() -> Agent.state.paused
    • Agent.stop() -> agent.state.stopped
    • Agent._external_pause_event

Related PRs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions