Boost logo

Boost :

Subject: Re: [boost] [ASIO] Issue with epoll reactor? Callback handler not executed.
From: Brad Higgins (bhiggins_at_[hidden])
Date: 2013-05-29 16:26:43


Arpan,

> Thanks Brad. This is likely what is happening since 2 consecutive calls to io_service.run_one fixed the problem. Note that a single call to io_service.run did NOT fix the problem.
>
> I do have follow up questions here:
> What are internal handlers?
> Where in boost documentation do we mention internal handlers?
> Is this internal handler business new to boost asio? The 1.44 version always calls my handler after the call to run_one. If yes, since which version has this been around?
see http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/reference/async_read_until/overload1.html

This isn't new.
>
> In async-read-until my handler will only get called after the 2nd call to io_service.run_one. Are there any indications after io_service.run_one the first time that I need to call the method a second time?
> What's a clean way to do async-read-until? Calling run_one twice looks genuinely messy.
> Why does the single call to io_service.run not fix the problem? It too returns 1.
I'm not sure why your io_service.run() fails to fix the problem. The io_service.run() method will run until there is no more work, or until the io_service is stopped. Are you stopping the io_service? Are you sure your handler wasn't called, when it returns 1?

-Brad


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk