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 ConcurrentHashMap inside RegistryAttributeImpl #3970

Merged

Conversation

apple502j
Copy link
Contributor

Resolves #3969
Needs backport to whatever version is supported

A static final map, keyed by RegistryKey of a registry, was being modified in the worker thread, which sometimes caused CME. The registry itself does not suffer from this problem, as a registry cannot be modified by more than one thread due to freezing. However, two registries could be created in two threads; thus requiring this change.

@apple502j apple502j added registry-sync Pull requests and issues related to registry sync small change labels Jul 25, 2024
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Jul 25, 2024
@modmuss50 modmuss50 merged commit a5d6675 into FabricMC:1.21 Jul 29, 2024
4 checks passed
modmuss50 pushed a commit that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me please Pull requests that are ready to merge registry-sync Pull requests and issues related to registry sync small change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occasional ConcurrentModificationException when loading datapacks
2 participants