|
Boost Users : |
Subject: Re: [Boost-users] ASIO io_service behaviour
From: Philip Gaskell (philip.gaskell_at_[hidden])
Date: 2008-10-31 04:37:26
Hi,
The reason I was expecting them to be called in that order was because of the
timings on each of the deadline_timers. I was expecting a 6 second wait for bleh
to be printed which is what happened, then a 1 second wait for print1 to be
called, then another second wait for print2 to be called and so on.
What actually happens after bleh is printed is a 4 second pause then all the
functions are called in reverse order immediately.
Regards,
Phil
E: philip.gaskell_at_[hidden] | M: +44(0)7891 199 959 | W: www.momote.com
EMAIL DISCLAIMER
The contents of this electronic mail message and any attachments (collectively "
this message") are confidential, possibly privileged and intended only for its
addressee ("the addressee"). If received in error, please delete immediately
without disclosing its contents to anyone. Neither the sender nor its management
or employees will in any way be responsible for any advice, opinion, conclusion
or other information contained in this message or arising from its disclosure.
Registered office: 8 The Parks, Haydock, Newton-Le-Willows, Merseyside. WA12 0JQ
Registered in England No. 4410772.
Igor R wrote:
>> I was expecting printHello to be called first, then print1, then print2, then print3 and print4, because that is the order the events were added to the io_service service.
>>
>> I expect I have missed some of, or misunderstood the documentation, but a
>> few hints as to what is happening will be appreciated.
>
> I do not see anything in the documentation that could make you think
> so -- could you please quote the documentation excerpt you refer to?
> I think the order of handlers invocation in your case is
> implementation-defined and it's not a good idea to rely on it.
> _______________________________________________
> 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