aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorneevek <i@neevek.net>2016-06-27 22:41:29 +0800
committercjihrig <cjihrig@gmail.com>2016-06-28 10:15:13 -0400
commit1d27bbbb8d65b218f5c6cb7f9c4e2f4f043b30ad (patch)
treea394b9a74bddfb5fede4e68b3c2f62a84814283d /docs/src
parent77c8abae33351acc3a845aebb61f485c94d61cdf (diff)
downloadlibuv-1d27bbbb8d65b218f5c6cb7f9c4e2f4f043b30ad.tar.gz
libuv-1d27bbbb8d65b218f5c6cb7f9c4e2f4f043b30ad.zip
doc: add a note on safe reuse of uv_write_t
uv_write_t can be reused safely only after the callback passed to uv_write is fired. PR-URL: https://github.com/libuv/libuv/pull/927 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/stream.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/src/stream.rst b/docs/src/stream.rst
index dfcad0fa..7989cd4f 100644
--- a/docs/src/stream.rst
+++ b/docs/src/stream.rst
@@ -26,7 +26,11 @@ Data types
.. c:type:: uv_write_t
- Write request type.
+ Write request type. Careful attention must be paid when reusing objects of
+ this type. When a stream is in non-blocking mode, write requests sent
+ with ``uv_write`` will be queued. Reusing objects at this point is undefined
+ behaviour. It is safe to reuse the ``uv_write_t`` object only after the
+ callback passed to ``uv_write`` is fired.
.. c:type:: void (*uv_read_cb)(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf)