Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] An error occured in asio::win_mutex.hpp
From: Igor R (boost.lists_at_[hidden])
Date: 2010-09-15 07:26:54


<...>
>  ftp_client_dtp(boost::asio::io_service& io_service)
>     : work_io_service_(),
>     work_resolver_(new boost::asio::ip::tcp::resolver(work_io_service_)),
>     work_socket_(new boost::asio::ip::tcp::socket(work_io_service_))
> ===>>  {
>  }
<...>
>  boost::scoped_ptr<boost::asio::ip::tcp::resolver> work_resolver_;
>  boost::scoped_ptr<boost::asio::ip::tcp::socket> work_socket_;
>
>  boost::asio::io_service work_io_service_;
<...>

Please, pay attention that member objects are initialized in the order
of their definition. I.e., when you initialize work_resolver_ and
work_socket_ you pass them uninitialized work_io_service_ as a
parameter.


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