R
Rolf Welskes
Hello,
because there are no manged news groups for windows presentation foundation,
I was told to
send my question here.
Problem:
In the documentation of the class Dispatcher you can read:
Threading:
Any public static (Shared in Visual Basic) members of this type are thread
safe. Any instance members are not guaranteed to be thread safe.
This is the standard sentence you see very often.
Now:
This would mean:
If I had 3 worker threads and would like to update the gui I have to use in
the 3 worker thread
marshaling.
this means in the worker threads I would call for exampel
myWindow.Dispatcher.Invoke(......).
Ok this works.
BUT: If I take the senctence above, Invoke would not be thread-safe. Means
I had to synchronise each call of Dispatcher.Invoke.
I cannot believ this, because Dispatcher.Invoke and Dispatcher.BeginInvoke
are
for the purpose of marshaling from different threads.
So, question:
Is it right, do I have to synchronize the calls Dispatcher.Invoke,
Dispatcher.BeginInvoke or not ???
Thank you for any help.
Best Regards
Rolf Welskes
because there are no manged news groups for windows presentation foundation,
I was told to
send my question here.
Problem:
In the documentation of the class Dispatcher you can read:
Threading:
Any public static (Shared in Visual Basic) members of this type are thread
safe. Any instance members are not guaranteed to be thread safe.
This is the standard sentence you see very often.
Now:
This would mean:
If I had 3 worker threads and would like to update the gui I have to use in
the 3 worker thread
marshaling.
this means in the worker threads I would call for exampel
myWindow.Dispatcher.Invoke(......).
Ok this works.
BUT: If I take the senctence above, Invoke would not be thread-safe. Means
I had to synchronise each call of Dispatcher.Invoke.
I cannot believ this, because Dispatcher.Invoke and Dispatcher.BeginInvoke
are
for the purpose of marshaling from different threads.
So, question:
Is it right, do I have to synchronize the calls Dispatcher.Invoke,
Dispatcher.BeginInvoke or not ???
Thank you for any help.
Best Regards
Rolf Welskes