Replies: 2 comments 1 reply
-
See : dotnet/runtime#85592 and unoplatform/Uno.Wasm.Bootstrap#799 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks we found the workaround. I am waiting for the introduction of .net9. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I will use multithreading and async Javascript Interop and it not work in .net8 and wasm.
-> need solution in .net8
I have create a small example project to demonstrate the problem.
It´s a simple WASM app:
-> UnoAppJsMultithreading.zip
The Javascript will called in the ShellViewModel.cs
The app calls js function on start of the ShellViewModel.
If you get the string (after 2 seconds) we navigate to the second page and show the string.
This fails with following error:
System.InvalidOperationException: Please use dedicated worker for working with JavaScript interop.
If I try that without multithreading it works.
-> comment out the following lines in the project file:
<WasmShellEnableThreads>true</WasmShellEnableThreads> <WasmShellPThreadsPoolSize>8</WasmShellPThreadsPoolSize>
This shoud be shown:
Have someone a solution for my problem?
Is there any workaround for .NET8.
What is the correct method?
I have tried it with callbacks (js to C#) and syncron js call.
But this is also not working. -> white screen and no error.
-> this is also implement in the solution above. Look at #define WITH_CALLBACK (ShellViewModel.cs)
Have anyone an idea?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions