-
Notifications
You must be signed in to change notification settings - Fork 11
Intentional Blocking On ValueTask
Michael Damatov edited this page Jan 17, 2024
·
2 revisions
Warns that invoking .GetAwaiter().GetResult()
for ValueTask
or ValueTask<T>
values might not block as intended.
-
.GetAwaiter().GetResult()
invoked forValueTask
andValueTask<T>
expressions.
💡 A quick fix is available to insert the .AsTask()
, effectively replacing .GetAwaiter().GetResult()
with .AsTask().GetAwaiter().GetResult()
💡 The analyzer can be deactivated in the ReSharper Options dialog.