The coroutine is able to use inline directives such as poll and exit. The coroutine will be suspended at these points and control will yield to the orchestrator. In the case of poll, the coroutine will be resumed when at least one call result is available.
This PR introduces an experimental
@dispatch.coroutine
decorator that compiles the provided function into a durable coroutine (https://github.com/stealthrocket/dispatch-sdk-python/pull/11).The coroutine is able to use inline directives such as
poll
andexit
. The coroutine will be suspended at these points and control will yield to the orchestrator. In the case ofpoll
, the coroutine will be resumed when at least one call result is available.