From d0ff965bc8c6c9fde792afc920cfe6adca5788ba Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 11 Jun 2021 14:16:02 -0700 Subject: [PATCH] Fix comment --- .../UnifiedSuggestions/UnifiedSuggestedActionsSource.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Features/Core/Portable/UnifiedSuggestions/UnifiedSuggestedActionsSource.cs b/src/Features/Core/Portable/UnifiedSuggestions/UnifiedSuggestedActionsSource.cs index 511f61851cdd7..5ae92fc11cad4 100644 --- a/src/Features/Core/Portable/UnifiedSuggestions/UnifiedSuggestedActionsSource.cs +++ b/src/Features/Core/Portable/UnifiedSuggestions/UnifiedSuggestedActionsSource.cs @@ -38,10 +38,8 @@ public static async ValueTask> GetFilt Func addOperationScope, CancellationToken cancellationToken) { - // It may seem strange that we kick off a task, but then immediately 'Wait' on - // it. However, it's deliberate. We want to make sure that the code runs on - // the background so that no one takes an accidentally dependency on running on - // the UI thread. + // Intentionally switch to a threadpool thread to compute fixes. We do not want to accidentally + // run any of this on the UI thread and potentially allow any code to take a dependency on that. var fixes = await Task.Run(() => codeFixService.GetFixesAsync( document, selection, includeSuppressionFixes: true, isBlocking, addOperationScope, cancellationToken), cancellationToken).ConfigureAwait(false);