Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] deadline_timer callback is not called
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-10-14 13:43:11


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net