
On Fri, 08 Jan 2010 09:22:06 +0100, Boris Haeberlein
[...]I were just wondering because the example is mentioned in the strand-section of the overview. So this might just be a bad example?
I just checked the other strand example at http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/tutorial/tuttimer5..... This makes sense to me but not the HTTP server 3.
I am still not sure about this. In the strand-overview (http://tinyurl.com/ya7g5g3) there is also a passage about composed operations and intermediate handlers which I don't understand. It might be that this is true for the HTTP 3 example.
A composed operation is eg. async_read() which "is implemented in terms of zero or more calls to the stream's async_read_some function" (see http://www.boost.org/doc/libs/1_41_0/doc/html/boost_asio/reference/async_rea...). But the HTTP server 3 calls async_read_some() through a strand (which is not a composed operation). The HTTP server 3 also calls async_write() which is a composed operation. However I can't see any intermediate handlers (there is no other asynchronous operation started after async_write() is called; thus there is no handler which could be called between handlers invoked by async_write_some() - the asynchronous operation async_write() is composed of). Boris