📄 timeoutthread.h
字号:
#ifndef TIMEOUT_THREAD_H#define TIMEOUT_THREAD_H#include <MTL/MTL.h>//#include <IResult.h>//#include <Thread.h>#include <STAR/CORBA.h>#include <predefine.h>#include <DataRecovery.h>//#include "DataRecovery_impl.h"//#include <sys/time.h>//#include <CDictionary.h>#include <list>class DataRecovery_impl;struct Elem_T{ string ipport; DataRecovery_impl * pDR;};class CTimeOutThread : MultiMutex, public MTLThread //public Thread_T{ time_t thetime; struct tm * curr_time; time_t curr_int; //vector<IResult_impl*> ResultList; list<Elem_T> DRList; long m_lTimeOut; long m_lInterval; void DelNodeInner(); bool compareIPPORT(Elem_T e,const char* ipport) { string s = ipport; return (e.ipport == ipport); } bool comparepDR(Elem_T e,const DataRecovery_impl* pDR) { return (e.pDR == pDR); } public: CTimeOutThread(long lTimeOut, long lInterval); ~CTimeOutThread(); void addNode(const char * ipport, DataRecovery_impl* theDR); void delNodebyIp(const char * ipport); void delNodebyPointer(DataRecovery_impl* theDR); bool bTimeOut(DataRecovery_impl* theDR); virtual void run(); bool IsNil(); void ReleaseAll();};typedef MTLHandleT<CTimeOutThread> TimeOutThreadHandle;//typedef ThreadHandleT<CTimeOutThread> TimeOutThreadHandle;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -