Skip to content

Conversation

@rossgrambo
Copy link
Member

This pull request introduces a cancellation mechanism to the feature evaluation process in the Microsoft.FeatureManagement library. The changes ensure that long-running feature evaluations can be cancelled if needed, improving the responsiveness and control over feature management operations.

Key changes include:

Cancellation Token Integration:

Cancellation Checks:

These updates enhance the robustness of the feature management system by allowing operations to be cancelled gracefully, which can be particularly useful in scenarios where feature evaluations are time-sensitive or resource-intensive.

Addresses #531

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a cancellation mechanism to the feature evaluation process in the Microsoft.FeatureManagement library, allowing for early termination during long-running feature evaluations.

  • Added a CancellationToken property to FeatureFilterEvaluationContext.
  • Integrated cancellation checks into the IsEnabledAsync and AssignVariantAsync methods to handle cancellation requests efficiently.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Microsoft.FeatureManagement/FeatureManager.cs Added cancellation checks in evaluation loops for feature enabled and variant assignment methods.
src/Microsoft.FeatureManagement/FeatureFilterEvaluationContext.cs Added a CancellationToken property to support cancellation in feature filters.

@rossgrambo rossgrambo merged commit f2c258b into main May 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants