?? thread.h
字號:
#ifndef __THREAD__INCLUDED_H_#define __THREAD__INCLUDED_H_#if defined(WIN32)#include <windows.h>#include <process.h>//#include <afxwin.h>//#include <afxmt.h>#else //WIN32#include <pthread.h>#endif //WIN32// ----------------------------------------------------------------------// class Thread// ----------------------------------------------------------------------class Thread { public: Thread(void* (*fun)(void*), void* arg); void Start(); void Stop(); void Join(); void Suspend(); // automatically releases all held locks void Resume(); void Lock(); void Unlock(); protected: ~Thread(); void* (*m_fun)(void*); void* m_arg;#if defined(WIN32) uintptr_t m_thread; HANDLE m_mutex; //CWinThread* m_pThread; //CCriticalSection m_lock;#else //WIN32 pthread_t m_threadID; pthread_mutex_t m_mutex; pthread_cond_t m_cond;#endif //WIN32};#endif // __THREAD__INCLUDED_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -