Skip to content

[Core] Support cooperative cancelation for ray.cancel API.  #39152

Open
@rkooo567

Description

@rkooo567

Description

Currently, when actor tasks are canceled, if the task is already running they are not interrupted.

To support cancelation in the middle of execution, we can support cooperative cancelation. This seems to be the standard way to cancel in-flight execution in Python.

We can enable it by setting the ray.get_runtime_context().canelled() to be True when the cancel request is received.

Use case

Allow to interrupt ongoing task execution for ray.cancel API

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issue, but not time-criticalcoreIssues that should be addressed in Ray Corecore-apienhancementRequest for new feature and/or capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions