|
Boost Users : |
Subject: Re: [Boost-users] ASIO cancel question
From: J.W.F. Thirion (derik_at_[hidden])
Date: 2009-08-08 04:05:57
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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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