|
Boost Users : |
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
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