-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[browser][MT] Handling blocking wait #99833
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pavelsavara
added
arch-wasm
WebAssembly architecture
area-VM-threading-mono
os-browser
Browser variant of arch-wasm
labels
Mar 15, 2024
Tagging subscribers to 'arch-wasm': @lewing |
This was referenced Mar 15, 2024
pavelsavara
force-pushed
the
browser_mt_pnse
branch
2 times, most recently
from
March 20, 2024 18:33
b22e759
to
401ac3c
Compare
pavelsavara
force-pushed
the
browser_mt_pnse
branch
from
March 21, 2024 18:55
401ac3c
to
df00d23
Compare
This was referenced Mar 22, 2024
pavelsavara
force-pushed
the
browser_mt_pnse
branch
from
March 22, 2024 18:33
19034d2
to
d65353c
Compare
pavelsavara
force-pushed
the
browser_mt_pnse
branch
from
March 25, 2024 11:28
d65353c
to
3a8eaea
Compare
# Conflicts: # src/mono/browser/runtime/loader/config.ts # src/mono/browser/runtime/managed-exports.ts # src/mono/browser/runtime/types/internal.ts
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
31 tasks
This was referenced Apr 2, 2024
This was referenced Apr 2, 2024
maraf
reviewed
Apr 3, 2024
...ervices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSSynchronizationContext.cs
Show resolved
Hide resolved
maraf
approved these changes
Apr 4, 2024
All the CI failures are #99888 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
.Wait
MainThreadingMode
andJSThreadInteropMode
configurationThread.WarnOnBlockingWaitOnJSInteropThread
ThrowWhenBlockingWait
modeJSThreadBlockingMode
now could have following valuesPreventSynchronousJSExport
- defaultJSExport
from being called from JavaScript code in UI thread.JSWebWorker
synchronousJSExport
always works.JSWebWorker
blocking .Wait always warns.ThrowWhenBlockingWait
JSExport
to be called from JavaScript code also in UI thread..Wait
throws PNSE.JSImport
throws PNSE (because it would deadlock otherwise in 100% cases).JSWebWorker
synchronousJSExport
always works.JSWebWorker
blocking.Wait
always throws PNSE.WarnWhenBlockingWait
JSExport
to be called from JavaScript code also in UI thread..Wait
warns.JSImport
throws PNSE (because it would deadlock otherwise in 100% cases).JSWebWorker
synchronousJSExport
always works.JSWebWorker
blocking.Wait
always warns.DangerousAllowBlockingWait
JSExport
to be called from JavaScript code, and allows managed code to use blocking.Wait
.Wait
onPromise
/Task
chains could lead to deadlock because JS event loop is not processed and it can't resolve JS promises.JSExport
to be called from JavaScript code also in main thread.JSImport
throws PNSE (because it would deadlock otherwise in 100% cases).Contributes to #76958
Contributes to #98652
Contributes to #99951
Fixes #98804
Fixes #97914
Fixes #44622
More scenarios: #93603 (comment)