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

Support cancellation in AsyncBarrier #1329

Closed
chenzhekl opened this issue Jun 26, 2024 · 2 comments · Fixed by #1330
Closed

Support cancellation in AsyncBarrier #1329

chenzhekl opened this issue Jun 26, 2024 · 2 comments · Fixed by #1330
Assignees
Milestone

Comments

@chenzhekl
Copy link

Is your feature request related to a problem? Please describe.

I want to have AsyncBarrier to support cancellation in SignalAndAwait, such that I can free those async functions from awaiting the barrier to finish.

Describe the solution you'd like

Maybe we can have SignalAndAwait accept an CancellationToken as its argument.

Describe alternatives you've considered

None

Additional context

None

@AArnott AArnott self-assigned this Jun 26, 2024
@AArnott
Copy link
Member

AArnott commented Jun 26, 2024

I'm not sure whether we'll deliver this yet. But in the meantime you can tack on .WithCancellation(ct) on the SignalAndWait call to achieve the same effect that we would probably deliver.

@chenzhekl
Copy link
Author

Thanks! @AArnott . .WithCancellation(ct) works perfect for me as a workaround.

@AArnott AArnott modified the milestones: v17.11, v17.12 Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants