Properly await calls to ensure exception handling works for sync and async scenarios#81826
Properly await calls to ensure exception handling works for sync and async scenarios#81826CyrusNajmabadi merged 4 commits intodotnet:mainfrom
Conversation
|
Fascinating. This tiny change massively affected razor. |
| { | ||
| return notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken); | ||
| await notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken).ConfigureAwait(false); | ||
| return; |
There was a problem hiding this comment.
note: this preserves thee old behavior. we were returning. so this would stop after the first hit. but i don't know if that's actually what we want here. note: if i don't return we get a high amount of memory use (presumably because we're issuing the refresh for a ton of cases. given that we dont' pass the docUri in, i'm guessing we do want tehse semantics.
There was a problem hiding this comment.
yes, the old behavior is correct. refresh notifications are typically server-wide, and don't apply to a specific document or project. Once we've sent one, we don't need to send any more as a single request indicates everything (for that feature) is out of date.
| { | ||
| return notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken); | ||
| await notificationManager.SendRequestAsync(GetWorkspaceRefreshName(), cancellationToken).ConfigureAwait(false); | ||
| return; |
There was a problem hiding this comment.
yes, the old behavior is correct. refresh notifications are typically server-wide, and don't apply to a specific document or project. Once we've sent one, we don't need to send any more as a single request indicates everything (for that feature) is out of date.
https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build/results?buildId=13038110&view=results