
Rutger,
I didn't know it would exit when it ran out of work. Your solution worked
perfectly! I added that line and Service.run() no longer exits prematurely.
Thanks for your insight!
-- Dylan
For anyone who might try to do something similar in the future, here is the
complete code listing that works properly.
#include <iostream>
#include
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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users