|
| 1 | += nng_aio_busy(3) |
| 2 | +// |
| 3 | +// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech> |
| 4 | +// |
| 5 | +// This document is supplied under the terms of the MIT License, a |
| 6 | +// copy of which should be located in the distribution where this |
| 7 | +// file was obtained (LICENSE.txt). A copy of the license may also be |
| 8 | +// found online at https://opensource.org/licenses/MIT. |
| 9 | +// |
| 10 | + |
| 11 | +== NAME |
| 12 | + |
| 13 | +nng_aio_busy - test if asynchronous I/O is busy |
| 14 | + |
| 15 | +== SYNOPSIS |
| 16 | + |
| 17 | +[source, c] |
| 18 | +---- |
| 19 | +#include <nng/nng.h> |
| 20 | +
|
| 21 | +bool nng_aio_busy(nng_aio *aio); |
| 22 | +---- |
| 23 | + |
| 24 | +== DESCRIPTION |
| 25 | + |
| 26 | +The `nng_aio_busy()` function returns true if the |
| 27 | +_aio_ is currently busy performing an asynchronous I/O |
| 28 | +operation or is executing a completion callback. |
| 29 | + |
| 30 | +If no operation has been started, or the operation has |
| 31 | +been completed or canceled, and any callback has been |
| 32 | +executed, then it returns false. |
| 33 | + |
| 34 | +This is the same test used internally by |
| 35 | +xref:nng_aio_wait.3.adoc[`nng_aio_wait()`] |
| 36 | + |
| 37 | +NOTE: Care should be taken to ensure that the _aio_ object is not |
| 38 | +freed when using this function. The caller is responsible for |
| 39 | +coordinating any use of this with any reuse of the _aio_. |
| 40 | + |
| 41 | +== RETURN VALUES |
| 42 | + |
| 43 | +True if the _aio_ is busy, false otherwise. |
| 44 | + |
| 45 | +== ERRORS |
| 46 | + |
| 47 | +None. |
| 48 | + |
| 49 | +== SEE ALSO |
| 50 | + |
| 51 | +[.text-left] |
| 52 | +xref:nng_aio_abort.3.adoc[nng_aio_abort(3)], |
| 53 | +xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)], |
| 54 | +xref:nng_aio_wait.3.adoc[nng_aio_wait(3)], |
| 55 | +xref:nng_aio.5.adoc[nng_aio(5)], |
| 56 | +xref:nng.7.adoc[nng(7)] |
0 commit comments