-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Ideally, the following would not happen:
@workflow.defn
class WaitForSharedMutableStateWorkflow:
def __init__(self) -> None:
self.cond = False
@workflow.run
async def run(self):
self.cond = True
await asyncio.gather(self.coro("1"), self.coro("2"))
async def coro(self, id: str):
await workflow.wait_condition(lambda: self.cond)
print(f"after wait coro {id} sees {self.cond}") # ❗❗ <== coro2 sees False❗
self.cond = False
await asyncio.sleep(1)
self.cond = TrueCompletely eliminating the possibility would be ideal, but best-effort improvements would also be welcome.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request