I just wanted to say thanks to all who responded. My solution is to make use of shared_ptr and enable_shared_from_this rather than trying to manage the lifetime of the object myself. I can't see a way of doing that at the moment due to the unpredictable nature of the invocation process of ASIO, which isn't a bug in ASIO, but rather the way it was designed (fully asynchronous). On Fri, 2009-08-07 at 17:18 +0300, Roman Shmelev wrote:
But even if we put aside the design/technical aspects and concentrate on the semantic ones: why should the error indicate cancellation if we were too late to cancel the operation and it actually managed to succeed?
Heh, from user's(or mine) point of view it hasn't succeed in time :)
From user's point of view - op succeeds only when handler was called. mm, I see holes in my logic, it's too.. "high-level"
Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users