Esempio n. 1
0
int main (int argc, char **argv) {
	//初始化线程池
	initThreadPool(3);
	int t[10] = {0};
	int i = 0;
	for (i = 0; i < 10; ++i)
	{
		t[i] = i;
		addTaskToPool(doTask, &t[i]);
	}
	sleep(10);//测试,等待子线程结束
	destroyPool();
	return 0;

	//加入任务
	//退出 释放互斥量 清理内存
}
MongoDBConnectionPool::~MongoDBConnectionPool() {
	destroyPool();
}
void UIActionPool::cleanup()
{
    /* Destroy pool: */
    destroyPool();
}
Esempio n. 4
0
ThreadPool::~ThreadPool()
{
    destroyPool();
}
Esempio n. 5
0
CMemoryPool::~CMemoryPool()
{
	/*销毁内存池*/
	destroyPool();
}
Esempio n. 6
0
MemoryCacheImpl::~MemoryCacheImpl() {
	destroyPool();
}