Reputation: 18168
If I call
Dispatcher.BeginInvoke(operation, DispatcherPriority.Loaded)
1,000,000 times from over 20 threads, are those 1,000,000 operations guranteed to be executed by the UI thread in the order the BeginInvoke calls were made?
Upvotes: 15
Views: 3039
Reputation: 5003
msdn says that If multiple BeginInvoke calls are made at the same DispatcherPriority, they will be executed in the order the calls were made
But if you are accessing the Dispatcher
from multiple thread then Any instance members are not guaranteed to be thread safe.
Upvotes: 8