Skip to content

Support cancellation in AsyncBarrier #1329

Closed

Description

@chenzhekl

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

Activity

  1. AArnott commented on Jun 26, 2024

    @AArnott
    Member

    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.

  2. chenzhekl commented on Jun 28, 2024

    @chenzhekl
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions