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
When WasmEnableThreads is enabled, .NET moves entirely to a background Web Worker, making synchronous JS-to-.NET calls (DotNet.invokeMethod) impossible. This breaks libraries that provide 1-to-1 JavaScript API wrappers — including SpawnDev.BlazorJS (147,000+ downloads) — because the JavaScript spec requires synchronous handling for operations like event.preventDefault() and beforeunload.
Community-built solutions like SpawnDev.BlazorJS.WebWorkers (90,000+ downloads) already provide multi-threading while keeping the main .NET instance on the UI thread, preserving synchronous interop.
The question: Is there a plan to offer a hybrid mode — threading enabled but .NET stays on the main thread — or is the Deputy Thread the only supported path forward? And is running .NET on the browser's main thread a long-term supported execution model?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question for the panel:
When
WasmEnableThreadsis enabled, .NET moves entirely to a background Web Worker, making synchronous JS-to-.NET calls (DotNet.invokeMethod) impossible. This breaks libraries that provide 1-to-1 JavaScript API wrappers — including SpawnDev.BlazorJS (147,000+ downloads) — because the JavaScript spec requires synchronous handling for operations likeevent.preventDefault()andbeforeunload.Community-built solutions like SpawnDev.BlazorJS.WebWorkers (90,000+ downloads) already provide multi-threading while keeping the main .NET instance on the UI thread, preserving synchronous interop.
The question: Is there a plan to offer a hybrid mode — threading enabled but .NET stays on the main thread — or is the Deputy Thread the only supported path forward? And is running .NET on the browser's main thread a long-term supported execution model?
Related issue: #54365
Beta Was this translation helpful? Give feedback.
All reactions