Boost logo

Boost Users :

From: Igor R. (igor_rubinov_at_[hidden])
Date: 2008-05-13 03:52:17


Hi Ricardo,
 
IIUC, it's bad idea to call async_write before the previous call to async_write is completed (the same is true for async_read), since it's not guaranteed the "parallel" async_write's/read's are dispatched in the order you wish. The correct flow would be to call next async_write in the writeHandler. You can find lots of examples in ASIO tutorial.

> To: boost-users_at_[hidden]> From: gumbeto_at_[hidden]> Date: Mon, 12 May 2008 19:26:39 +0100> Subject: [Boost-users] [asio] async_write and callback order> > Hi all,> > I tried to clarify this on the irc but no one was sure about it:> - when calling async_write multiple times, is there any guarantee > that the handle_write callback I pass is called in the same order?> <...>
> Ricardo>
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE



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