Re: [asio-users] Timer accuracy and custome services
Brought to you by:
chris_kohlhoff
From: Aleksandr I. <aig...@op...> - 2006-12-12 15:54:34
|
Christopher Kohlhoff <chris@...> writes: > > Hi Aleksandr, > > I deliberately left the ordering unspecified to give freedom to the > implementor to be as efficient as possible. And of course while some > applications may want to give preference to the execution of timer > handlers, others may want to give socket operations a higher priority. > So I don't think changing the io_service is a generic solution. > > Instead, I have hacked up a quick example that uses asio's handler > invocation hook to show how to associate priorities with a set of > handlers. Rather than executing the handlers immediately from inside the > io_service::run() call, they are added to a queue for separate execution > in order of priority. The attached example is compiled against the > version of asio in CVS, and I have tested it with g++ 4.0 and MSVC 8.0. > > Cheers, > Chris Hi Chris! Thanks for an answer that example seems is a valid solution to my problem. I took ASIO from sourceforge and play with that new version, but now my question is when its going to be available in boost compatible form aka 0.3.8. In other words can you enlighten me and others on your future release plans. |