Skip to content

Commit fd82298

Browse files
authored
Clarify determinism of wait_condition with comment (#1638)
* Clarify determinism of wait_condition with comment * Make 0 make more sense
1 parent 3660af6 commit fd82298

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

temporalio/workflow/_context.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,11 @@ async def wait_condition(
928928
This function returns when the callback returns true (invoked each loop
929929
iteration) or the timeout has been reached.
930930
931+
Importantly, using `None` value for ``timeout`` means that no Temporal timer is created. This
932+
means changing from `None` to a positive value (or the inverse) constitutes a nondeterministic
933+
change to workflow code. Using ``0`` will cause this function to immediately throw a timeout and
934+
should not be used.
935+
931936
Args:
932937
fn: Non-async callback that accepts no parameters and returns a boolean.
933938
timeout: Optional number of seconds to wait until throwing

0 commit comments

Comments
 (0)