microsoft / microsoft/FeatureManagement-Dotnet

Async methods do not support cancellation

Open
#588 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.2k
Forks
129
Avg merge
1d 1h
Merged PRs (30d)
5

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/Microsoft.FeatureManagement/IFeatureManager.cs and the linked .NET cancellation guidance. Identify each asynchronous method and how its generic context overload handles CancellationToken. Done means the interface's async cancellation behavior is consistent and the context overload is no longer ambiguous, with relevant validation added where the repository indicates it belongs.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.