From e81203a2d53a36497e306b79b2eeae4bd33d0baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Mon, 18 Nov 2024 13:19:11 -0500 Subject: [PATCH] docs: Adjust threading in net9 --- doc/features-threading.md | 3 +++ doc/using-the-bootstrapper.md | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/doc/features-threading.md b/doc/features-threading.md index 02043c697..53fd64df0 100644 --- a/doc/features-threading.md +++ b/doc/features-threading.md @@ -4,6 +4,9 @@ uid: UnoWasmBootstrap.Features.Threading # Support for WebAssembly Threads +> [!CAUTION] +> Threading support is experimental, and .NET 9 support [has changed the main thread's ability to execute managed code](https://github.com/dotnet/runtime/issues/85592#issuecomment-2031876112). As a result, the support in the Uno Bootstrapper is limited to simple DOM interactions, and is not supported on Uno Platform UI apps. + Starting from .NET 7, experimental support for [WebAssembly threads](https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md) has been included. This support is provided by the bootstrapper 7.0 and later, for interpreter and AOT modes. The following documentation explains how to enable threading. > [!IMPORTANT] diff --git a/doc/using-the-bootstrapper.md b/doc/using-the-bootstrapper.md index d9d37c7df..d59c1afd4 100644 --- a/doc/using-the-bootstrapper.md +++ b/doc/using-the-bootstrapper.md @@ -114,6 +114,14 @@ If you're not using the Uno.SDK and that you are using AOT with `WasmShellMonoRu If not set, you may get the error `error MSB4036: The "MonoAOTCompiler" task was not found"`. +### Threading + +Microsoft’s runtime team [has made major changes](https://github.com/dotnet/runtime/issues/85592#issuecomment-2031876112) in .NET 9 to how threads interact with the DOM and JavaScript, aiming to improve stability. + +Since threading was, and continues to be an experimental feature, these changes now prevent managed code from running on the main JavaScript thread — something Uno Platform depends on. + +As a result, WebAssembly threading is currently not supported in Uno Platform apps. However, as Microsoft’s runtime team is working on it, we hope that the support for threading may return in future .NET 10 preview builds. + ### IDBFS In version 8.x and earlier of the bootstrapper, IDBFS support was enabled by default.