D
Dan Foody
I had a background task collecting data from a server which wanted to
update lots of parts of the UI with new information (potentially while
the user is interacting with it).
At first I was using Control.Invoke to get work done on the UI thread
-- but this was resulting in all sorts of random
System.ExecutionEngineException crashes.
When I switched the UI to periodically read the data from a queue (in
a timer event), these crashes went away.
Does anyone know how/why Control.Invoke would have these problems
versus doing the exact same work in a timer event? And, how would I
avoid them (since I'd prefer to use this async approach rather than a
timer-based polling approach).
Thanks
update lots of parts of the UI with new information (potentially while
the user is interacting with it).
At first I was using Control.Invoke to get work done on the UI thread
-- but this was resulting in all sorts of random
System.ExecutionEngineException crashes.
When I switched the UI to periodically read the data from a queue (in
a timer event), these crashes went away.
Does anyone know how/why Control.Invoke would have these problems
versus doing the exact same work in a timer event? And, how would I
avoid them (since I'd prefer to use this async approach rather than a
timer-based polling approach).
Thanks