ch***************@gmail.com <ch***************@gmail.com> wrote:
What is the advised way to sync to threads one is the primary thread
that handles rendering, and a secondary thread that occasionally
updates the data the render thread uses. I have tried a few things like
the Interlocked routines but they don't work like they did in MFC.
If the render thread is a UI thread, you should use
Control.Invoke/BeginInvoke if you're changing the UI (or want to
marshall any other call to the UI thread). See
http://www.pobox.com/~skeet/csharp/t...winforms.shtml
Otherwise, read the rest of the article (that's a page from the middle
of the article) and see if it helps you, then come back and ask again
(with more details) if it doesn't.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too