I’d like to run something like this:
CMutex m;
for( int I = 0; I < 100; I++)
{
m.Load( INFINITE );
//”run a thread” that run m.Unload()
}
my problem is that the second time the main loop runs m.Load(INFINITE )
It doesn’t wait to my thread has runed m.Unload();
What have I missed?
CMutex m;
for( int I = 0; I < 100; I++)
{
m.Load( INFINITE );
//”run a thread” that run m.Unload()
}
my problem is that the second time the main loop runs m.Load(INFINITE )
It doesn’t wait to my thread has runed m.Unload();
What have I missed?