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

📄 thread.h

📁 LINUX下很好的C++线程池源码类
💻 H
字号:
// Author:onebird
// Date 2006.08.22
// For Cross Thread Pool Class
//////////////////////////////////////////////////////////////////////
#ifndef _THREAD_H_
#define _THREAD_H_
#include "mthread.h"
#include "mutex.h"
//#include <pthread.h>

#include "threadjob.h"
#include "threadpool.h"


class ThreadPool;
class Thread
{
public:
////	static long get_threadcount(bool finc, bool finit = false);
	bool Create();
	inline  ThreadPool * get_threadpool() {
		return m_pthreadPool;
	}
	void run();
	Thread( ThreadPool * pPool );
	virtual ~Thread();

protected:
	//unsigned int m_threadid;
	//pthread_t m_thread;
	ThreadPool * m_pthreadPool ;
	MThread m_thread;
	MMutex  m_mutex;
	bool m_fquit;
};

#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -