[asio] basic handle query
Hi: I need to work with multiple basic handles and have a question: If I have a vector of basic handles and have them associated to the same io_service, do I have to call run everytime a new handle is added? Or will as I'm hoping the first io_service.run pick up the new handles if there added after the initial run call. Any help appreciated. Cheers Sean.
On 28.02.2011 19:39, Sean Farrow wrote:
Hi:
I need to work with multiple basic handles and have a question:
If I have a vector of basic handles and have them associated to the same io_service, do I have to call run everytime a new handle is added?
Or will as I’m hoping the first io_service.run pick up the new handles if there added after the initial run call. I don't understand that I think. run() blocks until it runs out of work, so if you have the chance of "adding handlers" you are already out of work and you must call run() again to instantiate work. If you are adding a handler from within a dispatched handler you are not out of work and you don't call run().
-- Mierswa, Daniel If you still don't like it, that's ok: that's why I'm boss. I simply know better than you do. --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
participants (2)
-
Daniel Mierswa
-
Sean Farrow