job.h
来自「Linux 下的线程池的源代码。很好用!」· C头文件 代码 · 共 46 行
H
46 行
/******************************************************************Role:The file manage Linux thread ,include create thread etc. **CopyRight(c): ** flydish,2004,06,25 **History: ** Create by flydish,2004,06,25 ******************************************************************/#ifndef _JOB_H_#define _JOB_H_/****************************************************************** The class is an abstract class,which define the abstract job ** All job should inherit from it and implement the abstract ** method RunJob() ******************************************************************/#include "Thread.h"class CJob{private: int m_JobNo; //The num was assigned to the job char* m_JobName; //The job name CThread *m_pWorkThread; //The thread associated with the job public: CJob( void ); virtual ~CJob(); int GetJobNo(void) const { return m_JobNo; } void SetJobNo(int jobno){ m_JobNo = jobno;} char* GetJobName(void) const { return m_JobName; } void SetJobName(char* jobname); CThread *GetWorkThread(void){ return m_pWorkThread; } void SetWorkThread ( CThread *pWorkThread ){ m_pWorkThread = pWorkThread; } bool GetTerminated(void); virtual void Run ( void *ptr ) = 0;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?