Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight Dispatcher event queue order

Is the Silverlight Dispatcher event queue's ordering strictly preserved?

To elaborate: If I have exactly one other thread calling Dispatcher.BeginInvoke, is it guaranteed that those calls will be processed on the UI thread in the same order, or is the ordering nondeterministic?

like image 299
Charles Avatar asked Jan 07 '11 17:01

Charles


1 Answers

From MSDN:

If multiple BeginInvoke calls are made at the same DispatcherPriority, they will be executed in the order the calls were made.

so, yes, if the same thread is queueing the messages, they will be executed in the order they are queued. That's assuming Silverlight follows the same rules (I'm assuming it does but it does not include an accessible DispatcherPriority) and the MSDN docs for Silverlight's BeginInvoke are rather light.

like image 143
Kent Boogaart Avatar answered Sep 30 '22 13:09

Kent Boogaart