Aggregate Events firing nonlinearly with ThreadOption.PublisherThread

Topics: Prism v4 - WPF 4
Nov 14, 2013 at 2:53 PM
Edited Nov 14, 2013 at 2:54 PM
I'm running into an odd issue where an event is published and the subscriber is set to run on the publisher thread, yet the method to be fired by the subscription isn't the next item processed on that thread.

Not the exact scenario but this is what I'm seeing :

Method A subscribes to event, then calls method B (in different module) to do some work. Method B publishes the event which should then immediately run Method C. But the next line in method B runs prior to code in Method C.

Any ideas why this is executing like it's on an independent thread even when set to publisher?
Nov 15, 2013 at 2:52 PM

Based on your description there doesn't seem to be any reason behind why the Method B continues to execute before the subscribed Method C does.
It would be helpful if you could provide us more information about your scenario, like your version of .NET Framework and Prism and how you are subscribing / publishing the event in more detail.


Damian Cherubini