From 8eac3e497999be8fe1748d7f90384c82514fc869 Mon Sep 17 00:00:00 2001 From: Chi-Sheng Liu Date: Mon, 20 Jan 2025 20:22:16 +0800 Subject: [PATCH] WIP Debug CI Signed-off-by: Chi-Sheng Liu --- python/ray/actor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ray/actor.py b/python/ray/actor.py index 6a4819471bc78..800a5eaad605e 100644 --- a/python/ray/actor.py +++ b/python/ray/actor.py @@ -1775,9 +1775,13 @@ def exit_actor(): # In asyncio actor mode, we can't raise SystemExit because it will just # quit the asycnio task, not the main thread. Instead, we use # asyncio.Event for synchronization across multiple asyncio tasks. + class MyError(Exception): + pass + if worker.core_worker.current_actor_is_asyncio(): worker.core_worker.is_current_async_actor_exited = True - return + # return + raise MyError() # Set a flag to indicate this is an intentional actor exit. This # reduces log verbosity.