13 May 09:52
Re: [asio] async_write and callback order
From: Igor R. <igor_rubinov <at> hotmail.com>
Subject: Re: [asio] async_write and callback order
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-05-13 07:52:17 GMT
Subject: Re: [asio] async_write and callback order
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-05-13 07:52:17 GMT
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> lists.boost.org
> From: gumbeto <at> gmail.com
> 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 Learn more!
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> lists.boost.org
> From: gumbeto <at> gmail.com
> 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 Learn more!
_______________________________________________ Boost-users mailing list Boost-users <at> lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
RSS Feed