From 83768fe48b217898c0e1c420db1701651435dbb1 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Thu, 27 Aug 2020 11:49:19 -0500 Subject: [PATCH 1/2] fix --- doc/source/actors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/actors.rst b/doc/source/actors.rst index e3839b593a5b..bab02ab3ab8e 100644 --- a/doc/source/actors.rst +++ b/doc/source/actors.rst @@ -152,7 +152,7 @@ Note that this method of termination will wait until any previously submitted tasks finish executing. If you want to terminate an actor immediately, you can call ``ray.kill(actor_handle)``. This will cause the actor to exit immediately and any pending tasks to fail. Any exit handlers installed in the actor using -``atexit`` will be called. +``atexit`` will not be called. Passing Around Actor Handles ---------------------------- From 12ba39944a3b105b6a6e1e744457da65808346d3 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Fri, 28 Aug 2020 10:10:07 -0500 Subject: [PATCH 2/2] better --- doc/source/actors.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/source/actors.rst b/doc/source/actors.rst index bab02ab3ab8e..8c692042f562 100644 --- a/doc/source/actors.rst +++ b/doc/source/actors.rst @@ -149,9 +149,11 @@ approach should generally not be necessary as actors are automatically garbage collected. The ``ObjectRef`` resulting from the task can be waited on to wait for the actor to exit (calling ``ray.get()`` on it will raise a ``RayActorError``). Note that this method of termination will wait until any previously submitted -tasks finish executing. If you want to terminate an actor immediately, you can -call ``ray.kill(actor_handle)``. This will cause the actor to exit immediately -and any pending tasks to fail. Any exit handlers installed in the actor using +tasks finish executing and then exit the process gracefully with sys.exit. If you +want to terminate an actor forcefully, you can call ``ray.kill(actor_handle)``. +This will call the exit syscall from within the actor, causing it to exit +immediately and any pending tasks to fail. This will not go through the normal +Python sys.exit teardown logic, so any exit handlers installed in the actor using ``atexit`` will not be called. Passing Around Actor Handles