42 #ifndef _THREAD_BASE_H_
43 #define _THREAD_BASE_H_
86 m_pParameter = pParameter;
87 m_pThreadMethod = pThreadMethod;
93 void Start(
int nKillThreadTimeout = 5000)
116 for (
int i = 0; i < 100; i++)
133 if (!m_pThreadMethod)
135 printf(
"error: thread function not implemented, but using thread function variant.\n");
139 return m_pThreadMethod(m_pParameter);
145 virtual void _Start() = 0;
146 virtual void _Stop() = 0;
153 virtual void ThreadMethodFinished() { }
167 ThreadMethodFinished();
int(* ThreadMethodType)(void *pParameter)
void Start(int nKillThreadTimeout=5000)
virtual void StopThreadCallback()
void sleep_ms(unsigned int ms)
void Start(void *pParameter, ThreadMethodType pThreadMethod, int nKillThreadTimeout=5000)
virtual int ThreadMethod()