Creating a new asio timer instead of reusing the old one. Reusing leads to strange crashes. Whoever invented the semantics of the asio timer obviously did not consider the need to restart a timer within the handler. Oh well. The asio timer service also seems to sleep all the time (not using up 100% load if timeout of all timeouts are 0). Pending further tests, asio timers might be unsuitable.
This commit is contained in:
@@ -46,7 +46,7 @@ protected:
|
||||
bool cancelled;
|
||||
};
|
||||
|
||||
static void Handler(const boost::system::error_code &ec, boost::shared_ptr<TimerData> data);
|
||||
void Handler(const boost::system::error_code &ec, boost::shared_ptr<TimerData> data);
|
||||
typedef std::map<unsigned, boost::shared_ptr<TimerData> > TimerMap;
|
||||
|
||||
unsigned GetNextTimerId();
|
||||
|
||||
Reference in New Issue
Block a user