-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Wasm async entrypoint #44045
Wasm async entrypoint #44045
Conversation
Tagging subscribers to this area: @CoffeeFlux |
Part of the fix for #43958 |
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.
Looks fine to me other than my one bit of feedback + we don't want to merge the changes to the console sample, do we?
It isn't really a sample, it is a runtime test see #44016 |
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.
Couple minor stylistic nits
Makes sense, the 1 second sleep made it look like do-not-commit code |
Delay is in milliseconds and it has to be > 0 or it will not actually trigger the bug it is testing. |
a7fc3d8
to
9c13e09
Compare
Please update https://github.com/dotnet/runtime/blob/6072e4d3a7a2a1493f514cdf4be75a3d56580e84/src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs as well. You can also remove the internal code for |
This change doen't change the test runner see #44046 |
The runtime tests are failing because the dependency on System.Private.Runtime.InteropServices.JavaScript isn't getting tracked correctly and this change actually uses it. Looking into it more. |
- When the entry point of an assembly is async we need to execute that method and return the Task object - The Task object that is return from the execution of the async entry point will be marshaled to a JavaScript Promise.
5ebf69c
to
531b1fc
Compare
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.
This looks good
browser test failure is #44214 which is a test that isn't meant to run on Browser |
Make the Run in the threadless runner and WasmApplicationEntry point async so that it can yield back to js to resolve promises correctly. Depends on dotnet/runtime#44045, helps with dotnet/runtime#43958
Update browser tests to use dotnet/xharness#345 and be able to run promise related tests. Depends on dotnet/runtime#44045 The build will fail until the xharness change makes it in.
Update browser tests to use dotnet/xharness#345 and be able to run promise related tests. Depends on dotnet/runtime#44045 The build will fail until the xharness change makes it in. Co-authored-by: lewing <lewing@users.noreply.github.com>
This checks to see if the assemblies entry point is really a wrapper around an async method and if so tries to invoke the async entry point so that we can yield back to the js loop properly.