Thanks a lot to Aaron, Bjorn and Igor for you constructive comments !
Finally it works fine even in the environment of my former Qt-based
project. In fact some problems (especially the last on with the local work
variable in the constructor) might have sounded trivial but I tend to
become confused when switching to a new technology. Be prepared for more
issues to come ;-)
Best regards
Alex
Am 17.12.13 17:30 schrieb "Bjorn Reese" unter
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users