diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-01-17 22:27:16 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-01-17 22:27:16 -0800 |
| commit | 4c637fe5e4624eeaac55ed77deabdf427d2ba7a6 (patch) | |
| tree | 9ea677730ebb5de2db26fb5292a508b50958e154 /src | |
| parent | 0866c5193643d50ebce7b1cf74b255f38e9748b0 (diff) | |
| download | nng-4c637fe5e4624eeaac55ed77deabdf427d2ba7a6.tar.gz nng-4c637fe5e4624eeaac55ed77deabdf427d2ba7a6.tar.bz2 nng-4c637fe5e4624eeaac55ed77deabdf427d2ba7a6.zip | |
Comment updates for reaping dependency graphs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/reap.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/reap.h b/src/core/reap.h index fbc008b2..843c8c9c 100644 --- a/src/core/reap.h +++ b/src/core/reap.h @@ -1,6 +1,6 @@ // -// Copyright 2017 Garrett D'Amore <garrett@damore.org> -// Copyright 2017 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 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 // copy of which should be located in the distribution where this @@ -29,6 +29,14 @@ typedef struct nni_reap_item { // in the system. The intended usage is for an nni_reap_item to be a member // of the structure to be reaped, and and then this function is called to // finalize it. +// +// Note that is is possible to re-queue an item to reap on the reap list. +// This is useful if, for example, a reference count indicates that the item +// is busy. These will be queued at the end of the reap list. This will +// allow a dependency to defer reaping until its dependents have first been +// reaped. HOWEVER, it is important that the item in question actually be +// part of a fully reapable graph; otherwise this can lead to an infinite +// loop in the reap thread. extern void nni_reap(nni_reap_item *, nni_cb, void *); extern int nni_reap_sys_init(void); extern void nni_reap_sys_fini(void); |
