Share via

Do Tasks work in MacOS?

Andrew Broughton 96 Reputation points
2022-06-05T05:51:04.357+00:00

I have a Blazor app that uses a backgroundservice to pull items from a concurrent queue.
Under Windows, the service runs properly without blocking the UI thread.
Same program, running in MacOS blocks the UI thread.
Do tasks not work on MacOS?
Running latest VS preview on both machines, .net 6.

Developer technologies | .NET | Blazor

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 84,086 Reputation points
    2022-06-05T16:36:17.403+00:00

    Which blazor technology are you using on MacOs? And what UI thread are you taking about?

    The actual UI thread in blazor is the WebView/Browser JavaScript engine that updates the dom. The UI thread only supports async calls to the Blazor engine.

    The WASM Blazor host does not currently support threads because WASM does not have thread support. As this is a browser limitation it is true for both windows and macOs

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.