Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] An error occured in asio::win_mutex.hpp
From: Yasuhiko Yoshimura \(informax.co.jp\) (yoshimura_at_[hidden])
Date: 2010-09-16 02:07:08


Hi Igor R,

Thank you very much for your reply.

Now I have got a resolution that moving the initialization of 2 variable
objects
(work_resolver_ , work_socket_) that you mentioned into start() function
from
the constructor.

Thank you,
Yasuhiko Yoshimura

--------------------------------------------------
From: "Igor R" <boost.lists_at_[hidden]>
Sent: Wednesday, September 15, 2010 8:26 PM
To: <boost-users_at_[hidden]>
Subject: Re: [Boost-users] [asio] An error occured in asio::win_mutex.hpp

> <...>
>> 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 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