Wednesday, June 25, 2008

asio::io_service::reset hint

I can advise to call asio::io_service::reset before each call of asio::io_service::run:
This function must be called prior to any second or later set of invocations of the run(), run_one(), poll() or poll_one() functions when a previous invocation of these functions returned due to the io_service being stopped or running out of work. This function allows the io_service to reset any internal state, such as a "stopped" flag.


This may prevent you from some stupid errors.

No comments: