Ray Actors cannot stop

@GoingMyWay the reason this program hangs is because b.run.remote() never exits. For the default setup of an Actor, at the given time, there is only one thread running there and it’ll execute the next one only when the first one is finished.

For your case, either using async actor or thread actor (AsyncIO / Concurrency for Actors — Ray 1.12.1)

If using async actor, you’ll need to change the run into an async version (check + async sleep)

If using the threaded actor, please add the lock to prevent the race conditions.

1 Like