Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use caffeine instead of pair set #3

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Use caffeine instead of pair set #3

merged 2 commits into from
Apr 23, 2024

Conversation

LichtHund
Copy link
Member

Currently using a set of pairs of weak reference to listener and only removing based on null references on trigger means it'll only get rid of references if there is a trigger. In a situation where the trigger is held and never trigger the set will never empty.
Replacing it with a caffeine cache with weak keys and a list of listeners as value will make it so all listeners get instantly removed when the reference gets garbage collected.

@clrxbl clrxbl merged commit 53d70e4 into Noxcrew:main Apr 23, 2024
@kezz kezz added the enhancement New feature or request label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants