Subject: Re: [boost] Should pass boost::asio::io_service by raw pointer or smart pointer?
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-21 08:31:58
Thanks Vinnie, that blog and author were also referenced by a boost
asio book, wandering how much could be quickly outdated by books and
online commentate, this mailing list is the truly one for updated
Thank you and very much appreciated.
On 12/21/18, Vinnie Falco <vinnie.falco_at_[hidden]> wrote:
> On Thu, Dec 20, 2018 at 8:37 PM hh h <jupiter.hce_at_[hidden]> wrote:
>> It looks like a very good tutorial, but it used all shared pointer for
>> io_services, deadline_timer, socket, io_service::strand,
>> io_service::work and applications which contradicted to your comments,
>> was it wrong or outdated or did I misinterpreted your following point?
> It is both wrong, and outdated. Modern asio's executor_work_guard has
> a member function reset() which releases the work. Probably the
> shared_ptr in the examples used to manage the guard were written
> before the reset() member was added. But there are other constructs in
> that tutorial which are outdated.
> I would look to the latest Asio examples and documentation for best
> practices. And if you have specific questions don't hesitate to ask on
> the list or open an issue in the relevant repository.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk