aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-12-10 22:17:23 -0800
committerGarrett D'Amore <garrett@damore.org>2020-12-12 11:32:51 -0800
commit2033988343bce413763d3e9664e3e8372da48591 (patch)
treef39ce75c40dd94f95884d7d4c43a76df510a86bf /include
parentb45f876d005371f62fc261a5584c4d7dafd7a0f7 (diff)
downloadnng-2033988343bce413763d3e9664e3e8372da48591.tar.gz
nng-2033988343bce413763d3e9664e3e8372da48591.tar.bz2
nng-2033988343bce413763d3e9664e3e8372da48591.zip
fixes #1313 support deferred nng_aio destruction
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index 20454a17..b6d37eb3 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -488,6 +488,13 @@ NNG_DECL int nng_aio_alloc(nng_aio **, void (*)(void *), void *);
// It *must not* be in use at the time it is freed.
NNG_DECL void nng_aio_free(nng_aio *);
+// nng_aio_reap is like nng_aio_free, but calls it from a background
+// reaper thread. This can be useful to free aio objects from aio
+// callbacks (e.g. when the result of the callback is to discard
+// the object in question.) The aio object must be in further use
+// when this is called.
+NNG_DECL void nng_aio_reap(nng_aio *);
+
// nng_aio_stop stops any outstanding operation, and waits for the
// AIO to be free, including for the callback to have completed
// execution. Therefore the caller must NOT hold any locks that