ACE_Timer_Heap_T的一个问题
对应于ACE_Event_Handler,有typedef ACE_Timer_Heap_T<ACE_Event_Handler *,
ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
ACE_SYNCH_RECURSIVE_MUTEX>
ACE_Timer_Heap;
有没有对应于ACE_Service_Handler的类似宏定义,或者有类似于class ACE_Event_Handler_Handle_Timeout_Upcall<>的类,
还是说这个类要自己实现一个ACE_Service_Handler版本的? 不需要重复定义,楼主可以参考下面的代码 ,
在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); thanks modern 我还有个相关的问题,
class ACE_Thread_Timer_Queue_Adapter<t>是用于ACE_Event_Handler的
有没有类似的(模板)类是用于ACE_Handler的
参考Proactor的timer queue是可以写一个类似的,不过有现成的最好了
页:
[1]