| Remove sync-over-async where possible, consolidate blocking into helpers, add analyzers (#1714) * knock out some of the 'easy' .Result uses * convert some easy GetResult() calls to async * proper conversion of a lot of migration code to async * convert cluster epoch polls to async, and everything that's downstream of that * async some of checkpointing and replication * remove some more .Result, mostly by shifting to await helper methods * all .Results that can be removed (or turned into .GetAwaiter().GetResult()) have been removed * another audit of .GetResult(); converting more to tasks where appropriate * formatting * standardize on GetAwaiter().GetResult(); propogates exceptions correctly, but also more unique for searching * move all .GetResult()'s to a helper for easier auditing; cleanup more 'could be async' code * remove explicit .Wait() calls where possible, switch to helper where not * adopt Microsoft.VisualStudio.Threading analyzers; fix or suppress all findings * address feedback * fix nit * change NetworkHandler.Start() so auth proceeds asynchronously - introduce IsAuthenticated(...) to allow polling for auth completion, which many callers assume | 4 个月前 |