diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-06-02 08:46:05 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-06-02 08:46:05 -0700 |
| commit | 11db63e86810887411553c9184353763c5c40b73 (patch) | |
| tree | 4689584177914006afe77ebbc667dbc48002c97b /docs/man | |
| parent | 927f625f6b26fbfd0083b8add6ce1eac1d780eac (diff) | |
| download | nng-11db63e86810887411553c9184353763c5c40b73.tar.gz nng-11db63e86810887411553c9184353763c5c40b73.tar.bz2 nng-11db63e86810887411553c9184353763c5c40b73.zip | |
fixes #1428 Clarify disallowed operations in AIO completion callbacks
Diffstat (limited to 'docs/man')
| -rw-r--r-- | docs/man/nng_aio_alloc.3.adoc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/man/nng_aio_alloc.3.adoc b/docs/man/nng_aio_alloc.3.adoc index 66e53457..3a4a95e1 100644 --- a/docs/man/nng_aio_alloc.3.adoc +++ b/docs/man/nng_aio_alloc.3.adoc @@ -1,6 +1,6 @@ = nng_aio_alloc(3) // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This document is supplied under the terms of the MIT License, a @@ -33,6 +33,12 @@ It will be called with the argument _arg_. NOTE: The callback _callb_ must not perform any blocking operations, and must complete its execution quickly. If _callb_ does block, this can lead ultimately to an apparent "hang" or deadlock in the application. +This also means you should avoid operations such as allocating new objects, +which also means opening or closing sockets, dialers, and so forth. + +TIP: If more complex or blocking work needs to be performed by _callb_, a separate +thread can be used, along with a xref:nng_cv_alloc.3.adoc[condition variable] +which can be signaled by the callback. Asynchronous I/O operations all take an xref:nng_aio.5.adoc[`nng_aio`] handle such as allocated by this function. |
