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

Fix another thread data race issue introduced in #164. #165

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

OvermindDL1
Copy link

Fixes a data race via proper locking in the SynchronizedMap by using computeIfAbsent instead. The prior method could create cache0 twice in different threads, they each hold their own instance while only one gets stored in the map, they each add data to it, then one gets GC'd.

@mitchej123 mitchej123 merged commit 84d9dca into GTNewHorizons:master Jun 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants