⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 job.h

📁 Linux 下的线程池的源代码。很好用!
💻 H
字号:
/******************************************************************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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -