mirror of
https://github.com/wassname/ray.git
synced 2026-10-29 13:30:42 +08:00
Clarify docs for atexit behavior when using ray.kill (#12807)
This commit is contained in:
1 parent
1ce745cf44
commit
6262ee1f76
2 files changed
+4
-2
No files matched your search
@@ -1007,6 +1007,7 @@ def exit_actor():
|
||||
"""Intentionally exit the current actor.
|
||||
|
||||
This function is used to disconnect an actor and exit the worker.
|
||||
Any ``atexit`` handlers installed in the actor will be run.
|
||||
|
||||
Raises:
|
||||
Exception: An exception is raised if this is a driver or this
|
||||
|
||||
@@ -1533,11 +1533,12 @@ def kill(actor, *, no_restart=True):
|
||||
"""Kill an actor forcefully.
|
||||
|
||||
This will interrupt any running tasks on the actor, causing them to fail
|
||||
immediately. Any atexit handlers installed in the actor will still be run.
|
||||
immediately. ``atexit`` handlers installed in the actor will not be run.
|
||||
|
||||
If you want to kill the actor but let pending tasks finish,
|
||||
you can call ``actor.__ray_terminate__.remote()`` instead to queue a
|
||||
termination task.
|
||||
termination task. Any ``atexit`` handlers installed in the actor *will*
|
||||
be run in this case.
|
||||
|
||||
If the actor is a detached actor, subsequent calls to get its handle via
|
||||
ray.get_actor will fail.
|
||||
|
||||
Reference in new issue
Block a user