1 Star 0 Fork 68

leavegee / cocosocket

forked from beykery / cocosocket 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ThreadPool.h 638 Bytes
一键复制 编辑 原始数据 按行查看 历史
root 提交于 2014-01-26 17:47 . bug
#ifndef THREADPOOL_H
#define THREADPOOL_H
#include <string.h>
#include "WorkThread.h"
#include "Mutext.h"
class ThreadPool {
private:
int poolSize;
int initsize;
int alive;
WorkThread** pool;
Mutext* lock;
public:
ThreadPool(int ps = 1, int ic = 1);
~ThreadPool();
public:
bool Offer(Thread* task);
int GetPoolSize();
int GetInitializeCount();
int GetAliveCount();
void Shutdown();
};
inline int ThreadPool::GetPoolSize() {
return poolSize;
}
inline int ThreadPool::GetInitializeCount() {
return initsize;
}
inline int ThreadPool::GetAliveCount() {
return alive;
}
#endif
1
https://gitee.com/leavegee/cocosocket.git
git@gitee.com:leavegee/cocosocket.git
leavegee
cocosocket
cocosocket
master

搜索帮助