-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScriptos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Milestone
Description
Currently the UI thread is attached Mono thread and can call into Managed code.
The downside is that it needs to enter GC barrier, which makes it participate in the stop-the-world.
Current blockers are
- reflection in
init_managed_exports
mono_wasm_gc_lock
,mono_wasm_gc_unlock
used by BlazormonoObjectAsBoolOrNullUnsafe
used by BlazormonoStringToStringUnsafe
used by Blazormono_wasm_assembly_load
,mono_wasm_assembly_find_class
,mono_wasm_assembly_find_method
by looking for entrypoint- GC roots in hybrid globalization
Also emscripten will complain about blocking UI thread when ASSERTIONS
are enabled.
Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread
If we are unable to do this, the alternative is #76963
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScriptos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm