BlazorWorker
BlazorWorker copied to clipboard
.net9 support
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.
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.
Do you have any news concerning .net9 support ?
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
.net9 support is now tested and confirmed using the current version. Possibly due to changes in browser behaviour.