I'm from C background, and currently I want to make a small WinForms utility that has responsive GUI, and long running worker thread.
GUI is regular Form1 derived stuff, with progress indicators and stuff, worker thread is of kind new System.Threading.Thread();
.
In C++ everything is simple, in .NET I have no clue what to do.
Is there a PostMessage kind of way for data updates? Do I kick a Timer on the main thread that reads shared lock protected structure, is there another approach? Saw multiple documents on delegates, but after 10 different articles they doesn't seem to work, maybe because I have a Worker<->GUI relation, not a GUI<->GUI relation.
All GUI stuff is in GUI class, all worker stuff is in its own worker class. What are the best practices in managed world?