diff --git a/doc/history.qbk b/doc/history.qbk index 6721ada4..81281bbb 100644 --- a/doc/history.qbk +++ b/doc/history.qbk @@ -7,6 +7,41 @@ [section:history Revision History] +[heading Asio 1.4.5 / Boost 1.43] + +* Improved performance. +* Reduced compile times. +* Reduced the size of generated code. +* Extended the guarantee that background threads don't call user code to all + asynchronous operations + ([@https://svn.boost.org/trac/boost/ticket/3923 #3923]). +* Changed to use edge-triggered epoll on Linux. +* Changed to use `timerfd` for dispatching timers on Linux, when available. +* Changed to use one-shot notifications with kqueue on Mac OS X and BSD + platforms. +* Added a bitmask type `ip::resolver_query_base::flags` as per the TR2 proposal. + This type prevents implicit conversion from `int` to `flags`, allowing the + compiler to catch cases where users incorrectly pass a numeric port number as + the service name. +* Added `#define NOMINMAX` for all Windows compilers. Users can define + `BOOST_ASIO_NO_NOMINMAX` to suppress this definition + ([@https://svn.boost.org/trac/boost/ticket/3901 #3901]). +* Fixed a bug where 0-byte asynchronous reads were incorrectly passing an + `error::eof` result to the completion handler + ([@https://svn.boost.org/trac/boost/ticket/4023 #4023]). +* Changed the `io_control()` member functions to always call `ioctl` on the + underlying descriptor when modifying blocking mode + ([@https://svn.boost.org/trac/boost/ticket/3307 #3307]). +* Changed the resolver implementation to longer require the typedefs + `InternetProtocol::resolver_query` and `InternetProtocol::resolver_iterator`, + as neither typedef is part of the documented `InternetProtocol` requirements. + The corresponding typedefs in the `ip::tcp`, `ip::udp` and `ip::icmp` classes + have been deprecated. +* Fixed out-of-band handling for reactors not based on `select()`. +* Added new `BOOST_ASIO_DISABLE_THREADS` macro that allows Asio's threading + support to be independently disabled. +* Minor documentation improvements. + [heading Asio 1.4.4 / Boost 1.42] * Added a new HTTP Server 4 example illustrating the use of stackless coroutines diff --git a/doc/overview/serial_ports.qbk b/doc/overview/serial_ports.qbk index a603a4cc..f905d2d6 100644 --- a/doc/overview/serial_ports.qbk +++ b/doc/overview/serial_ports.qbk @@ -15,10 +15,11 @@ manner. For example, a serial port may be opened using: where name is something like `"COM1"` on Windows, and `"/dev/ttyS0"` on POSIX platforms. -Once opened the serial port may be used as a stream. This means the objects can -be used with any of the [link boost_asio.reference.read read()], [link -boost_asio.reference.async_read async_read()], [link boost_asio.reference.write write()], -[link boost_asio.reference.async_write async_write()], [link +Once opened, the serial port may be used as a [link +boost_asio.overview.core.streams stream]. This means the objects can be used +with any of the [link boost_asio.reference.read read()], [link +boost_asio.reference.async_read async_read()], [link boost_asio.reference.write +write()], [link boost_asio.reference.async_write async_write()], [link boost_asio.reference.read_until read_until()] or [link boost_asio.reference.async_read_until async_read_until()] free functions. diff --git a/doc/reference.qbk b/doc/reference.qbk index 58bf3928..d08c67c6 100644 --- a/doc/reference.qbk +++ b/doc/reference.qbk @@ -342,7 +342,7 @@ This function is used to asynchronously read a certain number of bytes of data f * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -505,7 +505,7 @@ This function is used to asynchronously read a certain number of bytes of data f * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -576,7 +576,7 @@ This function is used to asynchronously read a certain number of bytes of data f * The completion_condition function object returns 0. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other read operations (such as async\_read, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -1087,7 +1087,7 @@ This function is used to asynchronously read data into the specified streambuf u * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. If the streambuf's get area already contains the delimiter, the asynchronous operation completes immediately. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -1143,7 +1143,22 @@ To asynchronously read data into a streambuf until a newline is encountered: boost::asio::async_read_until(s, b, '\n', handler); +After the `async_read_until` operation completes successfully, the buffer `b` contains the delimiter: + { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation. @@ -1177,7 +1192,7 @@ This function is used to asynchronously read data into the specified streambuf u * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. If the streambuf's get area already contains the delimiter, the asynchronous operation completes immediately. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -1233,7 +1248,22 @@ To asynchronously read data into a streambuf until a newline is encountered: boost::asio::async_read_until(s, b, "\r\n", handler); +After the `async_read_until` operation completes successfully, the buffer `b` contains the delimiter: + { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\r', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation. @@ -1267,7 +1297,7 @@ This function is used to asynchronously read data into the specified streambuf u * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. If the streambuf's get area already contains data that matches the regular expression, the function returns immediately. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. If the streambuf's get area already contains data that matches the regular expression, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -1324,7 +1354,22 @@ To asynchronously read data into a streambuf until a CR-LF sequence is encounter boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); +After the `async_read_until` operation completes successfully, the buffer `b` contains the data which matched the regular expression: + { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the match, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\r', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `async_read_until` operation. @@ -1360,7 +1405,7 @@ This function is used to asynchronously read data into the specified streambuf u * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function. If the match condition function object already indicates a match, the operation completes immediately. +This operation is implemented in terms of zero or more calls to the stream's async\_read\_some function, and is known as a [*composed operation]. If the match condition function object already indicates a match, this asynchronous operation completes immediately. The program must ensure that the stream performs no other read operations (such as async\_read, async\_read\_until, the stream's async\_read\_some function, or any other composed operations that perform reads) until this operation completes. [heading Parameters] @@ -1553,7 +1598,7 @@ This function is used to asynchronously write a certain number of bytes of data * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes. [heading Parameters] @@ -1623,7 +1668,7 @@ This function is used to asynchronously write a certain number of bytes of data * The completion_condition function object returns 0. -This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes. [heading Parameters] @@ -1706,7 +1751,7 @@ This function is used to asynchronously write a certain number of bytes of data * An error occurred. -This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes. [heading Parameters] @@ -1766,7 +1811,7 @@ This function is used to asynchronously write a certain number of bytes of data * The completion_condition function object returns 0. -This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function. +This operation is implemented in terms of zero or more calls to the stream's async\_write\_some function, and is known as a [*composed operation]. The program must ensure that the stream performs no other write operations (such as async\_write, the stream's async\_write\_some function, or any other composed operations that perform writes) until this operation completes. [heading Parameters] @@ -37638,6 +37683,17 @@ The [link boost_asio.reference.io_service `io_service`] guarantees that the hand ] +[heading Remarks] + +This function throws an exception only if: + + +* the handler's asio_handler_allocate function; or + + +* the handler's copy constructor + +throws an exception. [endsect] @@ -37939,6 +37995,17 @@ The [link boost_asio.reference.io_service `io_service`] guarantees that the hand ] +[heading Remarks] + +This function throws an exception only if: + + +* the handler's asio_handler_allocate function; or + + +* the handler's copy constructor + +throws an exception. [endsect] @@ -57460,7 +57527,22 @@ To read data into a streambuf until a newline is encountered: std::getline(is, line); +After the `read_until` operation completes successfully, the buffer `b` contains the delimiter: + { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `read_until` operation. @@ -57599,7 +57681,22 @@ To read data into a streambuf until a newline is encountered: std::getline(is, line); +After the `read_until` operation completes successfully, the buffer `b` contains the delimiter: + { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the delimiter, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\r', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `read_until` operation. @@ -57738,7 +57835,22 @@ To read data into a streambuf until a CR-LF sequence is encountered: std::getline(is, line); +After the `read_until` operation completes successfully, the buffer `b` contains the data which matched the regular expression: + { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } + + +The call to `std::getline` then extracts the data up to and including the match, so that the string `line` contains: + + { 'a', 'b', ..., 'c', '\r', '\n' } + + +The remaining data is left in the buffer `b` as follows: + + { 'd', 'e', ... } + + +This data may be the start of a new line, to be extracted by a subsequent `read_until` operation. diff --git a/include/boost/asio/io_service.hpp b/include/boost/asio/io_service.hpp index 57794cf5..3863e96f 100644 --- a/include/boost/asio/io_service.hpp +++ b/include/boost/asio/io_service.hpp @@ -400,6 +400,14 @@ public: * @param handler The handler to be called. The io_service will make * a copy of the handler object as required. The function signature of the * handler must be: @code void handler(); @endcode + * + * @note This function throws an exception only if: + * + * @li the handler's @c asio_handler_allocate function; or + * + * @li the handler's copy constructor + * + * throws an exception. */ template void dispatch(CompletionHandler handler); @@ -417,6 +425,14 @@ public: * @param handler The handler to be called. The io_service will make * a copy of the handler object as required. The function signature of the * handler must be: @code void handler(); @endcode + * + * @note This function throws an exception only if: + * + * @li the handler's @c asio_handler_allocate function; or + * + * @li the handler's copy constructor + * + * throws an exception. */ template void post(CompletionHandler handler); diff --git a/include/boost/asio/read.hpp b/include/boost/asio/read.hpp index 8243d0f8..40ccc008 100644 --- a/include/boost/asio/read.hpp +++ b/include/boost/asio/read.hpp @@ -301,7 +301,10 @@ std::size_t read(SyncReadStream& s, basic_streambuf& b, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. + * async_read_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other read operations (such + * as async_read, the stream's async_read_some function, or any other composed + * operations that perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. @@ -430,7 +433,10 @@ void async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. + * async_read_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other read operations (such + * as async_read, the stream's async_read_some function, or any other composed + * operations that perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. @@ -477,7 +483,10 @@ void async_read(AsyncReadStream& s, basic_streambuf& b, * @li The completion_condition function object returns 0. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. + * async_read_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other read operations (such + * as async_read, the stream's async_read_some function, or any other composed + * operations that perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. diff --git a/include/boost/asio/read_until.hpp b/include/boost/asio/read_until.hpp index 2f50072f..ec6cb426 100644 --- a/include/boost/asio/read_until.hpp +++ b/include/boost/asio/read_until.hpp @@ -129,6 +129,16 @@ struct is_match_condition * std::istream is(&b); * std::string line; * std::getline(is, line); @endcode + * After the @c read_until operation completes successfully, the buffer @c b + * contains the delimiter: + * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * delimiter, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c read_until operation. */ template std::size_t read_until(SyncReadStream& s, @@ -206,6 +216,16 @@ std::size_t read_until(SyncReadStream& s, * std::istream is(&b); * std::string line; * std::getline(is, line); @endcode + * After the @c read_until operation completes successfully, the buffer @c b + * contains the delimiter: + * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * delimiter, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c read_until operation. */ template std::size_t read_until(SyncReadStream& s, @@ -285,6 +305,16 @@ std::size_t read_until(SyncReadStream& s, * std::istream is(&b); * std::string line; * std::getline(is, line); @endcode + * After the @c read_until operation completes successfully, the buffer @c b + * contains the data which matched the regular expression: + * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * match, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c read_until operation. */ template std::size_t read_until(SyncReadStream& s, @@ -511,8 +541,12 @@ std::size_t read_until(SyncReadStream& s, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. If the streambuf's get area already contains the - * delimiter, the asynchronous operation completes immediately. + * async_read_some function, and is known as a composed operation. If + * the streambuf's get area already contains the delimiter, this asynchronous + * operation completes immediately. The program must ensure that the stream + * performs no other read operations (such as async_read, async_read_until, the + * stream's async_read_some function, or any other composed operations that + * perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. @@ -561,6 +595,16 @@ std::size_t read_until(SyncReadStream& s, * } * ... * boost::asio::async_read_until(s, b, '\n', handler); @endcode + * After the @c async_read_until operation completes successfully, the buffer + * @c b contains the delimiter: + * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * delimiter, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c async_read_until operation. */ template void async_read_until(AsyncReadStream& s, @@ -580,8 +624,12 @@ void async_read_until(AsyncReadStream& s, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. If the streambuf's get area already contains the - * delimiter, the asynchronous operation completes immediately. + * async_read_some function, and is known as a composed operation. If + * the streambuf's get area already contains the delimiter, this asynchronous + * operation completes immediately. The program must ensure that the stream + * performs no other read operations (such as async_read, async_read_until, the + * stream's async_read_some function, or any other composed operations that + * perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. @@ -630,6 +678,16 @@ void async_read_until(AsyncReadStream& s, * } * ... * boost::asio::async_read_until(s, b, "\r\n", handler); @endcode + * After the @c async_read_until operation completes successfully, the buffer + * @c b contains the delimiter: + * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * delimiter, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c async_read_until operation. */ template void async_read_until(AsyncReadStream& s, @@ -650,8 +708,13 @@ void async_read_until(AsyncReadStream& s, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. If the streambuf's get area already contains data - * that matches the regular expression, the function returns immediately. + * async_read_some function, and is known as a composed operation. If + * the streambuf's get area already contains data that matches the regular + * expression, this asynchronous operation completes immediately. The program + * must ensure that the stream performs no other read operations (such as + * async_read, async_read_until, the stream's async_read_some function, or any + * other composed operations that perform reads) until this operation + * completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. @@ -702,6 +765,16 @@ void async_read_until(AsyncReadStream& s, * } * ... * boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); @endcode + * After the @c async_read_until operation completes successfully, the buffer + * @c b contains the data which matched the regular expression: + * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode + * The call to @c std::getline then extracts the data up to and including the + * match, so that the string @c line contains: + * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode + * The remaining data is left in the buffer @c b as follows: + * @code { 'd', 'e', ... } @endcode + * This data may be the start of a new line, to be extracted by a subsequent + * @c async_read_until operation. */ template void async_read_until(AsyncReadStream& s, @@ -723,8 +796,12 @@ void async_read_until(AsyncReadStream& s, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_read_some function. If the match condition function object already - * indicates a match, the operation completes immediately. + * async_read_some function, and is known as a composed operation. If + * the match condition function object already indicates a match, this + * asynchronous operation completes immediately. The program must ensure that + * the stream performs no other read operations (such as async_read, + * async_read_until, the stream's async_read_some function, or any other + * composed operations that perform reads) until this operation completes. * * @param s The stream from which the data is to be read. The type must support * the AsyncReadStream concept. diff --git a/include/boost/asio/write.hpp b/include/boost/asio/write.hpp index 2b9d4b7b..2a95735d 100644 --- a/include/boost/asio/write.hpp +++ b/include/boost/asio/write.hpp @@ -306,7 +306,10 @@ std::size_t write(SyncWriteStream& s, basic_streambuf& b, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_write_some function. + * async_write_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other write operations (such + * as async_write, the stream's async_write_some function, or any other composed + * operations that perform writes) until this operation completes. * * @param s The stream to which the data is to be written. The type must support * the AsyncWriteStream concept. @@ -360,7 +363,10 @@ void async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, * @li The completion_condition function object returns 0. * * This operation is implemented in terms of zero or more calls to the stream's - * async_write_some function. + * async_write_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other write operations (such + * as async_write, the stream's async_write_some function, or any other composed + * operations that perform writes) until this operation completes. * * @param s The stream to which the data is to be written. The type must support * the AsyncWriteStream concept. @@ -430,7 +436,10 @@ void async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, * @li An error occurred. * * This operation is implemented in terms of zero or more calls to the stream's - * async_write_some function. + * async_write_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other write operations (such + * as async_write, the stream's async_write_some function, or any other composed + * operations that perform writes) until this operation completes. * * @param s The stream to which the data is to be written. The type must support * the AsyncWriteStream concept. @@ -472,7 +481,10 @@ void async_write(AsyncWriteStream& s, basic_streambuf& b, * @li The completion_condition function object returns 0. * * This operation is implemented in terms of zero or more calls to the stream's - * async_write_some function. + * async_write_some function, and is known as a composed operation. The + * program must ensure that the stream performs no other write operations (such + * as async_write, the stream's async_write_some function, or any other composed + * operations that perform writes) until this operation completes. * * @param s The stream to which the data is to be written. The type must support * the AsyncWriteStream concept.