-
Notifications
You must be signed in to change notification settings - Fork 216
[RuntimeAsync] Model async continuation definition via delay-free #3090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RuntimeAsync] Model async continuation definition via delay-free #3090
Conversation
Instead of introducing a new mechanism to mark the async continuation register as busy until a kill we can keep use the delay-free mechanism, provided we take a bit care about where we insert the ref positions and about ensuring the async continuation ends up in the right spot.
cc @VSadov |
} | ||
|
||
BlockRange().Remove(asyncCont); | ||
BlockRange().InsertAfter(node, asyncCont); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go backwards from continuation to find the call, why do we need to force the order? Would it be "after" anyways?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see - to make sure there is nothing in between.
{ | ||
MarkAsyncContinuationBusyForCall(call); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should another MarkAsyncContinuationBusyForCall
below be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
030e62c
into
dotnet:feature/async2-experiment
After fetching from the async-experiment am getting an assert on x86.
|
No, changes from this PR wouldn't have any effect during the async transformation. This is likely a latent bug that is now showing up after merging because of recent JIT flowgraph changes (e.g. dotnet/runtime#114016). I will take a look when time permits. |
I think I have run x86 since the merge, but maybe I didn't or scenario needs some more conditions that were not there. |
Instead of introducing a new mechanism to mark the async continuation register as busy until a kill we can use the delay-free mechanism, provided we take a bit care about where we insert the ref positions and about ensuring the async continuation ends up in the right spot.