$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Thread] io_service post is unsuccessful
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-10-28 16:42:30
Dylan Klomparens wrote:
> My question is, why does my call to Service.post always fail? I know it is
> failing because the function that I post never gets called. There is not
> explicit return code or thrown exception to indicate that there is a
> problem.
>
An io_service keeps running as long as it has work to do. You can force an
io_service to keep running by attaching a work object. Try adding
boost::asio::io_service::work work(Service);
just below main, before the call to Service.run().
Cheers,
Rutger