You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does it make sense to have ALL methods return ValueTask in our API?
I have checked this code and cant understand why we have ValueTask there
await Authenticate(auth, cancellationToken).ConfigureAwait(false); // this method has sync way, its ok
// but here we always have the really asyn call
var res = await _httpClient.SendAsync(msg, cancellationToken).ConfigureAwait(false);
So, would it be better to leave high-level API with Tasks, and use ValueTasks only in places, where exist ways to run synchronously?
Beta Was this translation helpful? Give feedback.
All reactions