1 hour ago · Tech · 0 comments

This is the first post in the series: Exploring the .NET 11 preview. Part 1 - Running background tasks in Blazor with Web Workers (this post) In this post I take a look at the new Web Worker template available in the .NET 11 SDK, how to add it to an existing app, what the code is doing behind the scenes, and how to use it to run CPU intensive work without blocking the UI. This post was written using the features available in .NET 11 preview 3. Many things may change between now and the final release of .NET 11. Why do you need Web Workers? One of the neat things about .NET running in the browser using Blazor is that you can easily handle all sorts of complex domains such as image processing, document parsing, or data manipulation. This is simple enough when you are running using Blazor Server, and you can run these CPU intensive tasks on the server. Unfortunately, if you are using Blazor WASM, it's not always so simple. The core problem is that the JavaScript engine (e.g. V8) is…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.