[asio-users] issue about inherit from new timer_queue_base
Brought to you by:
chris_kohlhoff
From: 毕宇 <laz...@gm...> - 2012-06-27 03:14:56
|
Hi, I'm new to boost::asio. I just read some code in it. I need to write a new implementation of timer_queue_base instead of timer_queue (heap is not efficient under some condition) But how can I use it in the reactor class such as epoll_reactor? I feel a little strange that epoll_reactor only has one public method add_timer_queue(timer_queue<Time_Traits>&) . Thus you have to use timer_queue all the time(only use heap to manage all the timers) ! I guess change the interface from add_timer_queue(timer_queue<Time_Traits>&) to add_timer_queue(timer_queue_base& queue) more suitable for usage? I would appreciate any help/insight. |