From 6c8e002fad3fe93179852dd9c1ad6c2114dfc464 Mon Sep 17 00:00:00 2001 From: Spencer Judge Date: Fri, 10 Jul 2026 14:56:17 -0700 Subject: [PATCH] Clarify determinism of wait_condition with comment --- temporalio/workflow/_context.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/temporalio/workflow/_context.py b/temporalio/workflow/_context.py index 23c943cd0..33c1857ae 100644 --- a/temporalio/workflow/_context.py +++ b/temporalio/workflow/_context.py @@ -928,6 +928,10 @@ async def wait_condition( This function returns when the callback returns true (invoked each loop iteration) or the timeout has been reached. + Importantly, using a `0` or `None` value for `timeout` means that no Temporal timer is created. + This means changing from either of those values to a positive value (or the inverse) constitutes + a nondeterministic change to workflow code. + Args: fn: Non-async callback that accepts no parameters and returns a boolean. timeout: Optional number of seconds to wait until throwing