Skip to content
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

.NET7.0 rc2 threads disable WASM Blazor #548

Closed
RaoulRSV opened this issue Jul 3, 2023 · 2 comments
Closed

.NET7.0 rc2 threads disable WASM Blazor #548

RaoulRSV opened this issue Jul 3, 2023 · 2 comments

Comments

@RaoulRSV
Copy link

RaoulRSV commented Jul 3, 2023

URL of sample

sample

Note that this sample was derived as a .NET 7.0 rc2 from a sample named "javascript-interaction-blazor-wasm-dotnet6-master" found on github one year ago

Describe the bug
Enabling threads disable Blazor interface startup

To Reproduce

Steps to reproduce the behavior:

  1. open and run sample blazor interface appears
  2. on blazor interface click on CallC# button then calllocalstaticmethod continue after brakepoints then check that "localstaticmethodcalled" message appears
  3. stop project then enable thread property on .csproj and run the project for a second time then check that no blazor interface appears

Expected behavior
The blazor interface should appear as for the first run.
Note that another research on "blazor addin" (see #544) shows a similar behaviour : DotNet.invokeMethodAsync is disabled by thread enabling

Environment

  • Platform [PC desktop]: PC desktop
  • Visual basic 2022
  • Operating System: windows 11 with .Net7.0 rc2

Additional context

This issue could be merged with #544

@aafvstam
Copy link
Collaborator

@RaoulRSV If I follow your steps, I indeed see the same issue.

If I however read the blogpost here (and the comments below) it has not been applied for Blazor Web Assembly. The sample project in the blogpost was working, but that is in plain javascript ... not in Blazor. Also, the comments below indicate that for async Task handling threading is not needed.

We need to wait to get this into the code for Blazor Web Assembly for threading support.

@RaoulRSV
Copy link
Author

@aafvstam You're right. Now I get it. Multithreading is not available for blazor yet be it with .net 7.0 rc2 or .NET 8.0 preview. I did misinterpret the blogpost you mention. It is about webworkers in plain javascript as you mentionned and seems to still have its own difficulties see here.
Thank you for your help
I close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants