-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
11 changed files
with
124 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters