Skip to content

feat(python): Add request cancellation support #37

@zhexuany

Description

@zhexuany

Feature Request

Add ability to cancel long-running HTTP requests.

Motivation

Long-running requests cannot be cancelled, which can block application shutdown or cause delays when the recorder is unresponsive.

Proposed Solution

  • Use threading.Event for sync client cancellation
  • Use asyncio.CancelledError for async client cancellation
  • Add cancel() method to request contexts

Files to Modify

  • python/axon_client/axon_client/client.py
  • python/axon_client/axon_client/async_client.py

Priority

Low - Timeouts provide basic protection

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPython client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions