Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Improve WaitConditionAsync semantics #386

Open
cretz opened this issue Jan 6, 2025 · 1 comment
Open

[Feature Request] Improve WaitConditionAsync semantics #386

cretz opened this issue Jan 6, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@cretz
Copy link
Member

cretz commented Jan 6, 2025

Describe the solution you'd like

Today we wake up all wait conditions that are satisfied at the same time. This doesn't allow you to guarantee the condition is true on the line after the wait condition. We should only wake up a single wait condition when satisfied and then run the entire loop again. This will allow you to implement things like:

await Workflow.WaitConditionAsync(() => !locked);
locked = true;

I believe this issue is similar to temporalio/sdk-python#618 in Python. And would require an SDK flag.

@Sushisource
Copy link
Member

When doing this, it would make sense to resurrect the PR for #375 and include it with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants