diff options
| author | Garrett D'Amore <garrett@damore.org> | 2022-04-18 10:25:03 -0400 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2022-04-18 17:41:21 -0400 |
| commit | 722bf4621703ef238fa81018f8c3e68bcef91354 (patch) | |
| tree | 1389cd6082ecae9ab0db1239f48861ebefea3c4c /docs/man/nng_aio_busy.3.adoc | |
| parent | d9897897fcf9d1276190b5d20955c72fd632acac (diff) | |
| download | nng-722bf4621703ef238fa81018f8c3e68bcef91354.tar.gz nng-722bf4621703ef238fa81018f8c3e68bcef91354.tar.bz2 nng-722bf4621703ef238fa81018f8c3e68bcef91354.zip | |
fixes #1574 Non-blocking version of nng_aio_wait / nng_aio_result
This introduces a new API, nng_aio_busy(), that can be used
to query the status of the aio without blocking.
Some minor documentation fixes are included.
Diffstat (limited to 'docs/man/nng_aio_busy.3.adoc')
| -rw-r--r-- | docs/man/nng_aio_busy.3.adoc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/man/nng_aio_busy.3.adoc b/docs/man/nng_aio_busy.3.adoc new file mode 100644 index 00000000..4aaf09b5 --- /dev/null +++ b/docs/man/nng_aio_busy.3.adoc @@ -0,0 +1,56 @@ += nng_aio_busy(3) +// +// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech> +// +// This document is supplied under the terms of the MIT License, a +// copy of which should be located in the distribution where this +// file was obtained (LICENSE.txt). A copy of the license may also be +// found online at https://opensource.org/licenses/MIT. +// + +== NAME + +nng_aio_busy - test if asynchronous I/O is busy + +== SYNOPSIS + +[source, c] +---- +#include <nng/nng.h> + +bool nng_aio_busy(nng_aio *aio); +---- + +== DESCRIPTION + +The `nng_aio_busy()` function returns true if the +_aio_ is currently busy performing an asynchronous I/O +operation or is executing a completion callback. + +If no operation has been started, or the operation has +been completed or canceled, and any callback has been +executed, then it returns false. + +This is the same test used internally by +xref:nng_aio_wait.3.adoc[`nng_aio_wait()`] + +NOTE: Care should be taken to ensure that the _aio_ object is not +freed when using this function. The caller is responsible for +coordinating any use of this with any reuse of the _aio_. + +== RETURN VALUES + +True if the _aio_ is busy, false otherwise. + +== ERRORS + +None. + +== SEE ALSO + +[.text-left] +xref:nng_aio_abort.3.adoc[nng_aio_abort(3)], +xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)], +xref:nng_aio_wait.3.adoc[nng_aio_wait(3)], +xref:nng_aio.5.adoc[nng_aio(5)], +xref:nng.7.adoc[nng(7)] |
