|
Boost Users : |
Subject: Re: [Boost-users] async_send handler problem
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-12-17 11:30:24
On 12/17/2013 04:54 PM, Alexander Carôt wrote:
> SJ::SJ(){
> boost::asio::io_service::work work(dFC->io_service);
> boost::thread myThread(boost::bind(&boost::asio::io_service::run,
> &dFC->io_service));
> }
The work object is destroyed when execution leaves the constructor, and
the work destructor signals to the io_service that the work is complete.
Try making work a member variable instead.
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