利用ace的ACE_Task等类实现线程池的方法详解
本代码应该是ace自带的例子了,但是我觉得是非常好的,于是给大家分享一下。注释非常详细啊。头文件 代码如下:#ifndef THREAD_POOL_H#define THREAD_POOL_H/* In order to implement a thread pool, we have to have an object that can create a thread. The ACE_Task<> is the basis for doing just such a thing. */#include “ace/Task.h”//add by ychen 20070714
用户评论