vs-threading
vs-threading copied to clipboard
Support cancellation in AsyncBarrier
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
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.
Thanks! @AArnott . .WithCancellation(ct) works perfect for me as a workaround.