Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] Erratic results with io_service + deadline_timer
From: Igor R (boost.lists_at_[hidden])
Date: 2008-09-09 03:14:10


> for(;;)
> {
> g_svc.run();
> }

You don't have to call run() in a loop. Instead, you have to give
io_service some work *before* you call run() - it will exit when
there's no more work to do. Anyway, if for some reason you have to
call run() again, you're expected to call reset() prior to run().
Please, refer to the manual:
http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio/reference/io_service/run/overload1.html


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