C
Join ServerC#
help
❔ ObservableCollection + multithreading
DDeno11/29/2022
What is the proper, no bs way, to update a UI-bound collection of items from worker threads?
By update, I mean CRUD from worker threads on a collection that is MVVM bound to e.g. a WPF/Avalonia/...
I've found some articles that have solutions for .NET Framework, and some refer to custom-made collections... I'd like to know what is a good, production-battle-tested way of doing this (in .NET Core/.NET, of course).
Thanks in advance!
By update, I mean CRUD from worker threads on a collection that is MVVM bound to e.g. a WPF/Avalonia/...
ListView
.I've found some articles that have solutions for .NET Framework, and some refer to custom-made collections... I'd like to know what is a good, production-battle-tested way of doing this (in .NET Core/.NET, of course).
Thanks in advance!
DDeno11/29/2022
DynamicData
is one of the solutions I've found and used, but is there something native?SSossenbinder11/29/2022
I'm no UI expert, but hearing collections and multithreading in one sentence usually makes me think of the Concurrent* collections immediately
SSossenbinder11/29/2022
ConcurrentBag, ConcurrentQueue, ConcurrentDictionary etc
AAccord11/30/2022
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.