14 Oct
2009
14 Oct
'09
5:43 p.m.
Igor R ha scritto:
Probably, some handler (called by io_service) blocks? Check all the stuff, which is called directly or indirectly from within the handlers -- remember that if one of your handlers blocks, the other once won't have a chance to run.
Mmm...I do nothing more than: 1- Create a io_service::work on the heap; 2- Create a new Thread; 3- Call the io_service.run() within this new thread; 4- Assign the io_service::work* to a boost::shared_ptr; 5- Use the timer we discuss; No other io_service use! For now I discard the deadline timer "option" and I create a custom timer with a Thread and Sleep! :-( If u have other suggestions, are welcome! Thanks a lot, Daniele.