For example my thread calls a funtion that in this function I have a loop that i testdestroy it after everyloop. But instead of simply stopping executing after the test i want to release a mutex and print a message. Will it execute if it comes after the testdestroy. See the code below:
Code: Select all
UINT FooThread(void* pParam)
{
/*Some initializations*/
//...
while(!pCanal->boolTerminate)
{
/*loop*/
if ( pCanal->pOb->TestDestroy() )
{
pCanal->boolTerminate = true;
}
}
if ((shoLogCanal[pCanal->uchCanal] & 0x0100) == 0x0100)
{
wxLogDebug("leaving thread");
)
SetEvent(pCanal->hevTerminate);
}