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
There are several frequently used async helpers that always suspend. We can optimize these specially to skip checking for a null continuation after they return.
UnsafeAwaitAwaiter
AwaitAwaiter
TransparentAwait
TransparentAwaitOfT
TransparentAwaitValueTask
TransparentAwaitValueTaskOfT
Concretely my plan of attack would be something like:
Make sure the above functions are marked as [Intrinsic] and start recognizing them in lookupNamedIntrinsic
Add a bool AlwaysSuspends field to AsyncCallInfo and assign it in impSetupAsyncCall for these intrinsics
Teach AsyncTransformation::CreateCheckAndSuspendAfterCall to skip the check for this AlwaysSuspends case
When implemented, we should see a codegen improvement in a case like
asyncTaskFoo(){awaitTask.Yield();}
with runtime-async enabled (add the following to the .csproj:
Activity
dotnet-policy-service commentedon May 18, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @VSadov
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon May 18, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.