Is ray.shutdown() a blocking call?

How severe does this issue affect your experience of using Ray?

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

Is ray.shutdown() a blocking call? Can I be sure that once this function returns there’s nothing ray-related else running on workers?

I have seen examples where people do below and I want to avoid that

ray.shutdown()
while ray.is_initialized():
  sleep(2)

hi @mil.ad unfortunately today the ray.shutdown is not a blocking call as today.

oh, that’s not good at all. So what is the endorsed way of shutting down ray safely (i.e. in a blocking way)