See this solution to making writing a file thread safe
Sleep
using namespace System::Threading;
Pause
This allows you to literally pause execution where you are in the current function – it just pauses this thread
(more…)
Thread Safe Calls
If your application is doing asynchronous things, for instance a form has a callback function from a class receiving say some communications, then you will need to deal with calls to it in a thread safe way. The reason is that forms run on a single thread, but events in the other class will not necessarily be on the same thread. So to deal with this… (more…)



