From 5f69a5ba55058c7f5bfc4d5a250e72c56f31e0eb Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 23 Mar 2018 09:30:13 -0700 Subject: fixes #316 nni_aio_set_synch() usually doesn't do anything --- docs/man/nng_aio_stop.3.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/man/nng_aio_stop.3.adoc b/docs/man/nng_aio_stop.3.adoc index 5e65b8f7..02c258f8 100644 --- a/docs/man/nng_aio_stop.3.adoc +++ b/docs/man/nng_aio_stop.3.adoc @@ -28,9 +28,16 @@ The `nng_aio_stop()` function stops the asynchronous I/O operation associated with _aio_ by aborting with `NNG_ECANCELED`, and then waits for it to complete or to be completely aborted. -This is logically the equivalent of <> -followed by <>, except that the asynchronous -I/O handle may not be used for any further operations. +If an operation is in progress when this function is called, that operation +is canceled and the callback function is _not_ allowed to run. + +If the callback function is already running when this function is called, +then it is allowed to complete before returning to the caller. + +No new operations will be started on this _aio_. + +NOTE: Calling this function means that the operation may be aborted without +completing its callback function. TIP: When multiple asynchronous I/O handles are in use and need to be shut down, it is safest to stop all of them, before deallocating any of -- cgit v1.2.3-70-g09d2