$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.