Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO cancel question
From: Roman Shmelev (rshmelev_at_[hidden])
Date: 2009-08-07 02:22:02


Hi, Derik.

In my opinion, you must not place together async operations and their
sequence in the queue. The word "async" means "somewhen" and does not
means some order. So I suggest not to rely on "the handlers placed on
the queue always in sequence". I try to design my async apps with such
thinking. When you need some sequence, just schedule 1 op, and when
its completion handler fires - schedule 2nd op... and so on.

As for "2", I should say that at least in one-thread implementation,
the timer will fire with error code, not success code.
As for "1", I assume the same - error codes will be not success codes.
The most important thing - call "cancel" inside the io_service thread
(use "post" some function, as Igor already said)


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