-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ProcessCache: Delay removal for custom refcnts
The process cache uses reference counting to ensure we keep hold of entries that we still need to refer to, but allows us to remove those that we no longer need. Beyond "process" and "parent", messages could set custom refcnts on processes. For these we need to keep the process in the cache until all its descendants have exited (to allow events from any of the descendants to decrement the reference count on the process). This is to prevent the stale entry garbage collector from removing the process while it still has active descendants. This commit adds a flag on the internal process that specifies that the process has custom refcnts. It avoids removing the process or its descendants until all have exited by not decrementing the parent's refcnt until the process' refcnt is 0. Signed-off-by: Kevin Sheldrake <kevin.sheldrake@isovalent.com>
- Loading branch information
1 parent
becaae5
commit b42ab65
Showing
3 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters