Open
Description
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