Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract async navigation portions of https://github.com/dotnet/roslyn/pull/55635 #55891

Merged
merged 46 commits into from
Aug 26, 2021

Conversation

CyrusNajmabadi
Copy link
Member

#55635 Is a bit large in the amount of change it causes (and potential risk it introduces). Thsi PR pulls out the portions of that PR that update several codepaths to be async and to avoid sync-over-async-over-sync-etc.

FunctionId.CommandHandler_FindAllReference,
KeyValueLogMessage.Create(LogType.UserAction, m => m["type"] = "streaming"),
cancellationToken))
try
Copy link
Member Author

Choose a reason for hiding this comment

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

this is jus tmoving to a try/finally so all return paths call ONCompletedAsync.

Copy link
Member Author

Choose a reason for hiding this comment

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

viewing this PR with whitespace off will help.

var definitions = interfaceImpls.SelectMany(
i => GoToDefinitionHelpers.GetDefinitions(
i, solution, thirdPartyNavigationAllowed: false, cancellationToken)).ToImmutableArray();

var title = string.Format(EditorFeaturesResources._0_implemented_members,
Copy link
Member Author

Choose a reason for hiding this comment

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

this entire synchronous codepath will hopefully go away in a future PR.

Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

I can't comment on the implications of this but that changes themselves seem okay ¯\_(ツ)_/¯

@CyrusNajmabadi CyrusNajmabadi merged commit c37c15b into dotnet:main Aug 26, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the holdDocs3 branch August 26, 2021 17:12
@ghost ghost added this to the Next milestone Aug 26, 2021
}

if (presenter != null)
{
// Can only navigate or present items on UI thread.
await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

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

@CyrusNajmabadi there's a bunch of ConfigureAwait(false)es after this -- expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

taken offline. yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants