© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
Metalkon

How Do I Add Multithreading In Blazor WebAssembly .NET8?

I'm trying to figure out how to get multithreading to work in my project after seeing posts over a year ago that it was planned for .NET8, but I cannot find much information on how to get it to work. Some things simply don't work period (ex: new Thread(LoopMethod).Start(); from a .NET7 video), others use experimental .net8 stuff from like 2022 (???) in a video, or use some weird third party nuget packages that I cannot figure out and don't seem right anyways.

Anyone have any advice on how to get multithreading to work in my blazor webasm app so I can speed it up (currently takes 10-30sec to run the loop) by running multiple threads at once?

This is what it looks like currently but I don't think "Task.Run(() => LoopMethod());" is the right way, and i'm struggling to figure out how to make it update my stats object through the UpdateStats() method anyways.

https://github.com/Metalkon/Tellarknight-App/blob/home-threads/Tellarknight.Blazor/Pages/Home.razor
image.png
GitHub
Tellarknight-App/Tellarknight.Blazor/Pages/Home.razor at home-threa...
An app that's used to easily test your decks consistency - Metalkon/Tellarknight-App
Tellarknight-App/Tellarknight.Blazor/Pages/Home.razor at home-threa...
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ Blazor Webassembly
C#CC# / help
3y ago
❔ Blazor WebAssembly CSS
C#CC# / help
3y ago
❔ blazor .net8 vs angular
C#CC# / help
3y ago
Blazor WebAssembly API Controller
C#CC# / help
12mo ago