Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio::io_service::post and boost::asio::deadline_timer
From: Igor R (boost.lists_at_[hidden])
Date: 2012-01-17 04:41:03


> I am getting boost:asio::error::operation_aborted error codes for an unknown
reason in my handlers. No where did a cancel or reset occur, nor was
the deadline_time or the
io_service destroyed.

Note that if your timer has pending wait operations, and you call
expires_at() or expires_from_now(), any pending asynchronous wait
operations will be implicitly cancelled -- any you'll get
operation_aborted error in the appropriate handlers.

> Does anyone know if I may post to the same io_service a deadline_timer was
> constructed with or if they will interfere with eachother?

Yes, of course you may. You can use a single io_service for everything.

> May I post multiple times to the deadline timer calling back different methods?

Could you clarify what you mean?


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