Skip to main content

Waiting

Why you need it

You need to wait for timers, messages, Attribute values, or Step completion without burning a worker.

Code examples

Choose an SDK (preference is sticky in this browser; default Python).

return Wait.any_of(
channel.for_one(),
Timer.by_duration(timedelta(seconds=30)),
)

Wait.any_of / all_of over Conditions; client APIs like WaitForStepCompletion / WaitForAttribute.

How Dex implements it

Waiting is expressed as durable Conditions. Completions rehydrate the Step Execute path.

Traditional workarounds

Busy-poll loops, sleep+retry, or parking threads are the usual costly alternatives.