3 ms·
I definitely agree. Not using '.ConfigrueAwait(false)' is the exception rather than the rule. That said, I use an extension method '.NoSync()' to replace it whi
by achr2 10y ago
I definitely agree. Not using '.ConfigrueAwait(false)' is the exception rather than the rule. That said, I use an extension method '.NoSync()' to replace it which at least is more succinct and explicit.
There are a few other async/await constructs that are glaringly missing in .NET. My most useful is a function 'await TaskEx.EnsureNoContext()' which conditionally yields to the threadpool if not already on it. With this function I rarely need to use 'Task.Run'.