CollectionChanged notification across threads?
- by Mark
I'm writing a download manager using C#/WPF, and I just encountered this error:
This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.
The basic flow of my program is that a few web pages/downloads are enqueued at the start, and then they're downloaded asynchronously. When an HTML page has completed downloading, I parse it and look for more stuff to download, then enqueue it directly from within the worker thread.
I get that error when trying to send out the CollectionChanged event on my customized queue class. However, I need to fire that event so that the GUI can get updated.
What are my options?