Boost logo

Boost Users :

Subject: [Boost-users] Calls to asio::io_service::run on io_service object in stopped state don't generate an error.
From: Rory Hart (hartror_at_[hidden])
Date: 2011-12-12 18:30:15


Hey

I spent a day trying to work out why calls to io_service::run was returning
directly without running my async operations. It was my own fault of
course, the io_service was in a stopped state as I had previously called
io_service::stop and needed to call io_service::reset on it. This is
documented in both the stop and reset documentation if I had RTFM instead
of just skimming the interface.

Is there a reason io_service::run does not set an appropriate error on the
passed boost::system::error_code object when this is encountered? Certainly
it seems like an error case and would help circuital circumstances such as
my own.

If there is no obvious reason not to I will put in a feature request and
attempt a patch (I haven't touched the boost code base before).

Thanks

-- 
Rory Hart
http://www.roryhart.net
http://www.relishment.com


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