DDD_Library::~DDD_Library (void) #endif { /* free bufferspace */ FreeFix(iBuffer); /* close up all DDD components */ ddd_ConsExit(); ddd_JoinExit(); ddd_PrioExit(); ddd_XferExit(); ddd_IFExit(); ddd_IdentExit(); ddd_TopoExit(); ddd_CplMgrExit(); ddd_ObjMgrExit(); ddd_TypeMgrExit(); ddd_StatExit(); LC_Exit(); NotifyExit(); /* exit PPIF */ ExitPPIF(); #ifdef CPP_FRONTEND _instance = 0; #endif }
int CBaseVision::Deactive() { if (!m_ppname.empty()) { // 删除消息发送定时器 DeleteTimer(m_sTimerid); } if (m_vProcInfo.size() > 0) { // 注销消息模块 CMt::mt_destory(m_rkey); // 删除消息接收定时器 DeleteTimer(m_rTimerid); char szCmd[256] = {0}; vector<PROC_INFO>::iterator itrProc = m_vProcInfo.begin(); for (; itrProc != m_vProcInfo.end(); ++itrProc) { sprintf(szCmd, "kill -2 %d", itrProc->pid); FILE* fp = popen(szCmd, "r"); if (NULL != fp) { pclose(fp); } } } // 注销通信模块 map<string, key_t>::iterator itr = m_mapShmKey.begin(); for (; itr != m_mapShmKey.end(); ++itr) { CMt::mt_destory(itr->second); } vector<PTHREAD_PFUNC*>::iterator it = m_vPthread.begin(); for (; it != m_vPthread.end(); ++it) { // 停止线程 delete *it; *it = NULL; } LOGW("%s deactived. %s : %d\n", m_pname.c_str(), __FILE__, __LINE__); NotifyExit(PROC_EXIT); return 0; }
void wxLuaDebugTarget::Stop() { NotifyExit(); if (m_fConnected) { m_clientSocket.Shutdown(SD_BOTH); wxMilliSleep(100); m_clientSocket.Close(); } if (m_pThread) m_pThread->Wait(); }
bool wxLuaDebugTarget::Reset() { NotifyExit(); m_forceBreak = true; m_resetRequested = true; if (!m_fRunning) m_runCondition.Signal(); else if (m_fStopped) m_debugCondition.Signal(); return true; }
void iThread::Exit( bool Wait ) { FPendingExit = true; NotifyExit(); if ( !Wait ) { return; } if ( GetCurrentThread() != FThreadHandle ) { #ifdef _WIN32 WaitForSingleObject( ( HANDLE )FThreadHandle, INFINITE ); CloseHandle( ( HANDLE )FThreadHandle ); #else pthread_join( FThreadHandle, NULL ); #endif } }