|
Boost Users : |
Subject: [Boost-users] ASIO async IO, will the buffer corrupt?
From: Lloyd (lloyd_at_[hidden])
Date: 2010-05-21 05:24:14
Hello,
we are trying to write a high performane storage server. For that we are using Aynchronous IO with boost::asio. The data will be received at the storage server with the help of boost::asio::async_read(), and the data will be written to the storage with boost::asio::async_write() in the asyn_read() completion handler. Here we are planning to share the data buffer. The async read will be running in a loop, so if the write is not completed and if the next async_read() attempts to access the buffer, will the buffer be corrupted?
If we use seperate buffer for each async_read()+async_write() operation, wouldn't it be inefficient?
Thanks,
Lloyd
______________________________________
Scanned and protected by Email scanner
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