BlazorWorker icon indicating copy to clipboard operation
BlazorWorker copied to clipboard

.net9 support

Open Tewr opened this issue 1 year ago • 3 comments

Threads will not be supported in .net9 blazor wasm, so this library still fills a void in blazor. Any regressions in .net9 should be anticipated as opposed to previous releases where there was a significant delay due to the complexity of breaking changes.

Tewr avatar May 02 '24 08:05 Tewr

Initial tests fails on startup most of the time. The hotter /faster the startup is, the more likely it is to fail. Error is very frequent but not constant, and occurs during download phase and behaves like a deadlock - no more downloads are resumed, and initialization fails.

By walking up the stack I have found some kind of parallel download mechanism. A constant 'maxParallelDownloads' is defined here: https://github.com/dotnet/runtime/blob/release/9.0-rc1/src/mono/browser/runtime/loader/globals.ts#L94

initial tests show that if I change this value to 1 (loaderHelpers.maxParallelDownloads) during the load phase, things seems to work out fine, and the "deadlocky" situation does not appear.

Some additional testing is needed to find a good value for this constant, or see how the deadlocky situation can be avoided in the first place. may involve rewriting my bootloader.

Tewr avatar Sep 25 '24 19:09 Tewr

Do you have any news concerning .net9 support ?

TeddyAlbina avatar Jan 13 '25 07:01 TeddyAlbina

No news really, sorry. I probably have to fundamentally change the bootstrapper, it's not going to be a quick fix. May be a full rewrite. Have a look at the neighbor maybe https://github.com/LostBeard/SpawnDev.BlazorJS.WebWorkers they seem to have a more or less stable version for net9

Tewr avatar Jan 14 '25 05:01 Tewr

.net9 support is now tested and confirmed using the current version. Possibly due to changes in browser behaviour.

Tewr avatar Jul 16 '25 20:07 Tewr