Skip to content

Make IFeatureService async end-to-end to eliminate blocking thread-pool calls#51

Closed
Copilot wants to merge 2 commits into
mq-multienvfrom
copilot/sub-pr-46-yet-again
Closed

Make IFeatureService async end-to-end to eliminate blocking thread-pool calls#51
Copilot wants to merge 2 commits into
mq-multienvfrom
copilot/sub-pr-46-yet-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 19, 2026

IFeatureService.IsFeatureEnabled was blocking on IFeatureManagerSnapshot.IsEnabledAsync via .GetAwaiter().GetResult(), risking thread-pool starvation and deadlocks under ASP.NET request contexts.

Changes

  • IFeatureService / FeatureService — Replaced bool IsFeatureEnabled with Task<bool> IsFeatureEnabledAsync; implementation now returns the Task<bool> directly from IFeatureManagerSnapshot.IsEnabledAsync without blocking
  • UploadViewComponent / TabbedNavigationViewComponent — Updated all call sites to await IsFeatureEnabledAsync (both already in async contexts)
  • Page models (Index, Completed, Denied, Justification, Review) — Converted OnGet()async Task OnGetAsync() and awaited feature checks
// Before
public bool IsFeatureEnabled(string featureName)
    => _featureManager.IsEnabledAsync(featureName).GetAwaiter().GetResult();

// After
public Task<bool> IsFeatureEnabledAsync(string featureName)
    => _featureManager.IsEnabledAsync(featureName);

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: mark-quickel <112185610+mark-quickel@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on multi-environment support Make IFeatureService async end-to-end to eliminate blocking thread-pool calls Feb 19, 2026
Copilot AI requested a review from mark-quickel February 19, 2026 16:00
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.

2 participants