|
发表于 2009-10-23 12:45:41
|
显示全部楼层
不需要重复定义,楼主可以参考下面的代码 ,
在Proactor的构造函数可以配置定时器策略。
/// Public type.
typedef ACE_Timer_Queue_T<ACE_Handler *,
ACE_Proactor_Handle_Timeout_Upcall,
ACE_SYNCH_RECURSIVE_MUTEX>
TIMER_QUEUE;
/**
* Constructor. If @a implementation is 0, the correct implementation
* object will be created. @a delete_implementation flag determines
* whether the implementation object should be deleted by the
* Proactor or not. If @a tq is 0, a new TIMER_QUEUE is created.
*/
ACE_Proactor (ACE_Proactor_Impl *implementation = 0,
bool delete_implementation = false,
TIMER_QUEUE *tq = 0); |
|