Skip to content

Commit

Permalink
Merge pull request #930 from unoplatform/dev/jela/threading-doc
Browse files Browse the repository at this point in the history
docs: Adjust threading in net9
  • Loading branch information
jeromelaban authored Nov 19, 2024
2 parents 016dd11 + e81203a commit 0c4191f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/features-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 8 additions & 0 deletions doc/using-the-bootstrapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0c4191f

Please sign in to comment.