Can async method be concurrent with sync method?

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

  • None: Just asking a question out of curiosity

Hi,

I have an actor running a busy loop in a sync method. I would like to run some background tasks without waiting/blocking the busy loop.

If I add some async methods to the actor and await them in some coroutines, will the async methods be blocked by the busy loop?

Hello

Adding async methods to a Ray actor won’t guarantee concurrency with a busy loop in a sync method. The sync method will block actor resources unless it yields periodically. Async methods can run concurrently if the sync method allows other tasks to execute by yielding or awaiting.

1 Like