The instances of
System.Windows.Threading.Dispatcher
are created per thread. The property
Dispatcher.CurrentDispatcher
returns an instance associated with the calling thread, creating one of it was not yet created before, according the
lazy initialization pattern. Please see:
https://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.currentdispatcher%28v=vs.110%29.aspx[
^],
https://en.wikipedia.org/wiki/Lazy_initialization[
^].
It's easy to check up that the references obtained reference different objects if you do it in different threads. You can call this property from several different threads, including the UI thread, and check up the references using
System.Object.ReferenceEquals
. You will see that the
Dispatcher
objects are referentially different.
—SA