Boost logo

Boost Users :

Subject: Re: [Boost-users] Using boost::asio::async_write to stream out data
From: Igor R (boost.lists_at_[hidden])
Date: 2009-07-23 09:41:14


> I'm not 100% clear on this yet, is it safe for my thread to call async_write
> over and over again without waiting for previous writes to complete?
>
> Is it safe to do this on two different threads writing each out on their own
> socket?

It's safe to issue simultanious async_write's for different sockets
and buffers. It's not safe to do this for the same socket, because
async_write() does not guarantee that all the data is sent at once.


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