[Docs] Add Cancelation to main docs. (#8508)

* Update walkthrough.rst

* Adding example

* Better example

* Better example

* Adding Ray Kill Info
This commit is contained in:
Ian Rodney
2020-05-20 10:31:57 -07:00
committed by GitHub
parent cd706f40c4
commit f56b3be916
+14
View File
@@ -168,6 +168,20 @@ Further, remote functions can return multiple object IDs.
a_id, b_id, c_id = return_multiple.remote()
Remote functions can be canceled by calling ``ray.cancel`` on the returned Object ID. Remote actor functions can be stopped by killing the actor using the ``ray.kill`` interface.
.. code-block:: python
@ray.remote
def blocking_operation():
time.sleep(10e6)
return 100
obj_id = blocking_operation.remote()
ray.cancel(obj_id)
.. autofunction:: ray.cancel
:noindex:
Objects in Ray
--------------