Skip to content

Spurious "already cancelled" warning on shutdown #84

Description

@AymenFJA

When engine.shutdown() is called, it iterates all components and calls handle_task_cancellation on every non-done future. If a task was already cancelled earlier through the patched_cancel → backend.cancel_task → task_callbacks → handle_task_cancellation path, its future is already done by the time shutdown reaches it, producing the log warning "Attempted to handle an already cancelled task". There is no coordination between the explicit per-task cancel path and the bulk shutdown cancel path to prevent the double-handling.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions