|
Boost Users : |
Subject: Re: [Boost-users] IOService.run()
From: Ronny Spiegel (ronny.spiegel_at_[hidden])
Date: 2010-03-22 10:24:57
Hi,
yu have to start the io_service only once. But make sure your io_service
stays running. The event loop stops running when there are no more items in
its queue.
That means if you return from your timer without starting a new timer it
will return immediately.
Regards,
Ronny
On Mon, Mar 22, 2010 at 3:13 PM, Iskandar Prins <iprins_at_[hidden]> wrote:
> Ok, so basically when starting the timer, you need to call
> ioservice.run() as well
>
>
>
>
>
> *From:* boost-users-bounces_at_[hidden] [mailto:
> boost-users-bounces_at_[hidden]] *On Behalf Of *David Kaplan
> *Sent:* Monday, March 22, 2010 15:08
> *To:* boost-users_at_[hidden]
> *Subject:* Re: [Boost-users] IOService.run()
>
>
>
>
>
> I have a question regarding the asio::deadline_timer , it seems I need to
> run the ioservice.run() all the time in order to update the timer, which is
> seems undesirable. Any idea how I can just start the timer and wait for the
> callback instead?
>
> I was playing around with this today too. It seems that you only need to
> call io_service::run() once (that will start the timer).
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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