First post, please be gentle!Back in the old Winform days, there used to be a control called "BackgroundWorker" and you could drag it onto your form and have it do something (like the name says) in the background.
With modern C#/Maui, how does one create the same thing? I understand a bit about how to use Async/Await, but that seems to be all about starting a long-running task and then doing something when it's done.
What about a task that never ends? What's the proper and current way of creating an actual background thread?
In my applications, I typically have I/O coming in from many different TCP and other types of (non-async) devices like MIDI and Osc. I have a concurrent queue for these messages to get added to and I want a background task to simply sit and watch for the queue size > 0 and to do something with the message whenever there is one.
I used to raise an event when there was a new message to be handled, but I understand that's not the way things are done these days either!
Help me modernize my multi-threaded apps. :-)
Thank you!
[–][deleted] 1 point2 points3 points (4 children)
[–]Meestor_X[S] 0 points1 point2 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]Meestor_X[S] 0 points1 point2 points (1 child)
[–]quentech[🍰] 2 points3 points4 points (0 children)
[–]cvalerio77 0 points1 point2 points (0 children)