Discussion:
[asio-users] Little misleading detail mistake in documentation
mobi phil
2015-02-18 14:38:08 UTC
Permalink
Hi,

Thanks for the great work.

The comment for async_write_some

/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream
socket.
* * The function call always returns immediately.*


This is true when the completion is a callback, but not when we have a
coroutine. From coroutine point of view, the function is not returning
immediately but after data is available, exactly which is the point to have
async with coroutine.

It was a bit misleading for me as I was first evaluating the infrastructure
with the given echo_server example.

Suggest that this difference should be mentioned in the doc.

rgrds,
mobi phil
mobi phil
2015-02-18 14:41:21 UTC
Permalink
sorry, forgot to mention the file:

boost.git/libs/asio/include/boost/asio/basic_stream_socket.hpp arround line
687.

It seems the the doc of the full family of methods "suffer" from this
little problem.
Post by mobi phil
Hi,
Thanks for the great work.
The comment for async_write_some
/// Start an asynchronous write.
/**
* This function is used to asynchronously write data to the stream
socket.
* * The function call always returns immediately.*
This is true when the completion is a callback, but not when we have a
coroutine. From coroutine point of view, the function is not returning
immediately but after data is available, exactly which is the point to have
async with coroutine.
It was a bit misleading for me as I was first evaluating the
infrastructure with the given echo_server example.
Suggest that this difference should be mentioned in the doc.
rgrds,
mobi phil
--
rgrds,
mobi phil

being mobile, but including technology
http://mobiphil.com
Loading...