ray.actor.exit_actor#

ray.actor.exit_actor()[source]#

Intentionally exit the current actor.

This API can be used only inside an actor. Use ray.kill API if you’d like to kill an actor using actor handle.

When this API is called, an exception is raised and the actor will exit immediately. For asyncio actors, there may be a short delay before the actor exits if the API is called from a background task. Any queued methods will fail. Any atexit handlers installed in the actor will be run.

Raises:

TypeError – An exception is raised if this is a driver or this worker is not an actor.