Click to See Complete Forum and Search --> : Mutex problem


d00_ape
November 3rd, 2004, 11:17 AM
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?

Andreas Masur
November 4th, 2004, 02:45 AM
[ Moved thread ]

Andreas Masur
November 4th, 2004, 02:46 AM
Well...what are 'Load()' and 'Unload()'? These functions do not exist with the 'CMutex' class...

Furthermore, what are you trying to accomplish?