本文整理汇总了C++中TPZAutoPointer::DM方法的典型用法代码示例。如果您正苦于以下问题:C++ TPZAutoPointer::DM方法的具体用法?C++ TPZAutoPointer::DM怎么用?C++ TPZAutoPointer::DM使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPZAutoPointer
的用法示例。
在下文中一共展示了TPZAutoPointer::DM方法的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;
}