Skip to content

Async methods do not support cancellation #588

Open

Description

https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/src/Microsoft.FeatureManagement/IFeatureManager.cs does not support https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/cancel-an-async-task-or-a-list-of-tasks as is best practices in asynchronous programming.

Furthermore the overload Task<bool> IsEnabledAsync<TContext>(string feature, TContext context); gladly accepts CancellationToken as the context parameter, further adding confusion.

Activity

  1. jimmyca15 commented on Mar 30, 2026

    @jimmyca15
    Member

    Hello Michael Elleby (@michaelelleby), IFeatureManager was released without a CancellationToken parameter, and updating it would have been a breaking change.

    We added a new interface that supersedes IFeatureManager named IVariantFeatureManager. This has cancellation token support.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions