$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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.