-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The WebAssembly Threading not works as expected #5469
Comments
Thanks for the report. Threading support is experimental in .NET and is currently somehow available when target |
Hi, @jeromelaban Thanks for a quick response. The project is targeted to netstandard 2.0 and not uses .NET5 or .NET6. I would appreciate any help on this issue. The problem mainly related bootstrapper version. Actually, what I need to do is to render list of big images using skiasharp, because wasm is single thread on attempt to load big file main thread become blocked and to workaround that I have had plan to move bitmap loading logic to background |
The support for threads is very experimental, and there's no support I can give you on that matter, unfortunately. The .NET team has threading in its backlog, but that's as far as it goes for now. |
according to threading in its backlog topic not only me having need to have support of SkiaSharp + Threading. One thread behaviour significantly limits uno + wasm in usecase scenarious :(. If you are writing new app using Blazor that's one story, but, when you are trying to port desktop application it completely different |
Current behavior
I have tried to update WasmThreading example to the latest dev version of Bootstrap
after that console log start showing incorrect Thread id order sequence
[tid:1] Startup
[tid:1] Waiting for completion source
[tid:2] Thread begin
[tid:2] Got task result, raising event
[tid:2] Main thread exiting
[tid:2] Waiting for event
[tid:2] Got event, terminating thread
Expected behavior
Same as was described in blog article
[tid:1] Startup
[tid:1] Waiting for completion source
[tid:2] Thread begin
[tid:2] Waiting for event
[tid:1] Got task result, raising event
[tid:1] Main thread exiting
[tid:2] Got event, terminating thread
How to reproduce it (as minimally and precisely as possible)
Workaround
I'm not sure for 100% but seems that this issue appeared after 1.3.0 bootstrapper version. So, workaround for threading is to use versions of bootstrap <= 1.3.0
Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?
In my next project this issue has completely different behaviour. It not enteres to Thread body at all, I have added logging per line and getting next console output log
[tid:1] Run
[tid:1] var t = new Thread
[tid:1] t.Start
This project has next configuration
The text was updated successfully, but these errors were encountered: