aboutsummaryrefslogtreecommitdiff
path: root/src/core/reap.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-12-07 11:44:22 -0800
committerGarrett D'Amore <garrett@damore.org>2024-12-07 11:56:22 -0800
commit71e459eea31e9e47c0ce64a78e32b242d357f9a0 (patch)
treec4f6608066aaa6505a5625f399c94845abe6c162 /src/core/reap.h
parent8fa3b2aa8e9191669f137be39ba61ad39243483a (diff)
downloadnng-71e459eea31e9e47c0ce64a78e32b242d357f9a0.tar.gz
nng-71e459eea31e9e47c0ce64a78e32b242d357f9a0.tar.bz2
nng-71e459eea31e9e47c0ce64a78e32b242d357f9a0.zip
fini: add drain mechanism for aio, reap, and task subsystems
Make sure *everything* is drained before proceeding all the way to deallocation.
Diffstat (limited to 'src/core/reap.h')
-rw-r--r--src/core/reap.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/reap.h b/src/core/reap.h
index 5f631885..221fd17f 100644
--- a/src/core/reap.h
+++ b/src/core/reap.h
@@ -1,5 +1,5 @@
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -56,8 +56,9 @@ struct nni_reap_list {
extern void nni_reap(nni_reap_list *, void *);
-// nni_reap_drain waits for the reap queue to be drained.
-extern void nni_reap_drain(void);
+// nni_reap_sys_drain waits for the reap queue to be drained.
+// It returns true if it found anything to wait for.
+extern bool nni_reap_sys_drain(void);
extern int nni_reap_sys_init(void);
extern void nni_reap_sys_fini(void);