本文整理匯總了C++中TPZAutoPointer::HandleMessages方法的典型用法代碼示例。如果您正苦於以下問題:C++ TPZAutoPointer::HandleMessages方法的具體用法?C++ TPZAutoPointer::HandleMessages怎麽用?C++ TPZAutoPointer::HandleMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::HandleMessages方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: lock
void * OOPDataManager::ServiceThread(void * data)
{
#ifdef LOG4CXX
{
stringstream sout;
sout << "Starting service thread for DM";
LOGPZ_DEBUG(logger, sout.str().c_str());
}
#endif
OOPDataManager * lDMStar = static_cast<OOPDataManager *> (data);
TPZAutoPointer<OOPTaskManager> TM = lDMStar->TM();
TPZAutoPointer<OOPDataManager> lDM = TM->DM();
// lDM->fKeepGoing = true;
while (lDM->fKeepGoing)
{
lDM->WaitWakeUpCall();
#ifdef STEP_MUTEX
OOPLock<OOPGenericLockService> lock(&gMutex);
#endif
{
stringstream sout;
sout << lDM->GetProcID()
<< " Woke Up | One more round ------------------------------------------------------------------"
<< endl;
#ifdef LOG4CXX
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
#endif
}
{
stringstream sout;
sout << "Calling DM->HandleMessages()";
#ifdef LOG4CXX
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
#endif
}
lDM->HandleMessages();
{
stringstream sout;
sout << "Called DM->HandleMessages() | Calling lDM->FlushData()";
#ifdef LOG4CXX
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
#endif
}
lDM->FlushData();
{
stringstream sout;
sout
<< "Called DM->FlushData() | Going to Sleep on WaitWakeUpCall()";
#ifdef LOG4CXX
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
#endif
}
#ifdef STEP_MUTEX
lock.Unlock();
#endif
}
{
#ifdef LOG4CXX
stringstream sout;
sout << "Leaving DM ServiceThread calling HandleMessages and FlushData";
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
std::cout << sout.str().c_str() << " for Proc " << lDM->GetProcID()
<< endl;
#endif
}
lDM->HandleMessages();
lDM->FlushData();
{
#ifdef LOG4CXX
stringstream sout;
sout
<< "HandleMessages and FlushData called, DM->ServiceThread Finished";
LOGPZ_DEBUG(ServiceLogger, sout.str().c_str());
std::cout << sout.str().c_str() << " for Proc " << lDM->GetProcID()
<< endl;
#endif
}
return NULL;
}