Skip to content

Pending task cancel() returns the method object instead of calling it #83

Description

@AymenFJA

In patched_cancel, when a task has been registered but not yet submitted to the backend (uid not in self.running), the else branch executes return fut.original_cancel — returning the bound method object rather than invoking it. The future is therefore never marked as cancelled, the task remains in the ready queue, and it will be submitted and executed normally despite the caller having requested cancellation. This makes future.cancel() a no-op for any task that has not yet reached the backend.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions