diff --git a/src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs b/src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs index 916fcadcd0ffe349cc3a9b8fcfb8fbec7c74f1ca..7178a8397ac613264460548cd89da3463e2518df 100644 --- a/src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs +++ b/src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs @@ -297,6 +297,10 @@ private void UpdateReferenceLocationsTask(JoinableTask { var inlineRenameLocations = await findRenameLocationsTask.JoinAsync().ConfigureAwaitRunInline(); + // It's unfortunate that _allRenameLocationsTask has a UI thread dependency (prevents continuations + // from running prior to the completion of the UI operation), but the implementation does not currently + // follow the originally-intended design. + // https://github.com/dotnet/roslyn/issues/40890 await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, _cancellationTokenSource.Token); _cancellationTokenSource.Token.ThrowIfCancellationRequested();