diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-12-10 22:17:23 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-12-12 11:32:51 -0800 |
| commit | 2033988343bce413763d3e9664e3e8372da48591 (patch) | |
| tree | f39ce75c40dd94f95884d7d4c43a76df510a86bf /src/core/aio.h | |
| parent | b45f876d005371f62fc261a5584c4d7dafd7a0f7 (diff) | |
| download | nng-2033988343bce413763d3e9664e3e8372da48591.tar.gz nng-2033988343bce413763d3e9664e3e8372da48591.tar.bz2 nng-2033988343bce413763d3e9664e3e8372da48591.zip | |
fixes #1313 support deferred nng_aio destruction
Diffstat (limited to 'src/core/aio.h')
| -rw-r--r-- | src/core/aio.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/aio.h b/src/core/aio.h index 80f48341..dbe7fbb9 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -28,6 +28,10 @@ extern void nni_aio_init(nni_aio *, nni_cb, void *arg); // It waits for the callback to complete. extern void nni_aio_fini(nni_aio *); +// nni_aio_reap is used to asynchronously reap the aio. It can +// be called even from the callback of the aio itself. +extern void nni_aio_reap(nni_aio *); + // nni_aio_alloc allocates an aio object and initializes it. The callback // is called with the supplied argument when the operation is complete. // If NULL is supplied for the callback, then nni_aio_wake is used in its @@ -195,8 +199,8 @@ struct nng_aio { nni_list_node a_prov_node; // Linkage on provider list. void * a_prov_extra[2]; // Extra data used by provider - // Expire node. - nni_list_node a_expire_node; + nni_list_node a_expire_node; // Expiration node + struct nng_aio *a_reap_next; }; #endif // CORE_AIO_H |
