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

Rework synchronization in ProtobufMapper #484

Merged
merged 3 commits into from
Apr 7, 2024

Conversation

pjfanning
Copy link
Member

  • also marked the variable as volatile as this is something that is often done when you have concurrent access
  • the new code tries a little harder not to create multiple DescriptorLoaders. The old code could have queued up multiple threads where l was null and then each got the synchronization lock in turn and then created a fresh DescriptorLoader.

@pjfanning
Copy link
Member Author

@cowtowncoder would you have time to review this?

Copy link
Member

@cowtowncoder cowtowncoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: will rename lock member, add release notes.

@cowtowncoder
Copy link
Member

@cowtowncoder would you have time to review this?

Will do, thank you for reminder.

@cowtowncoder cowtowncoder changed the title remove synchronization from ProtobufMapper Rework synchronization in ProtobufMapper Apr 7, 2024
@cowtowncoder cowtowncoder merged commit 11e4b1f into FasterXML:2.18 Apr 7, 2024
4 checks passed
@pjfanning pjfanning deleted the remove-synchronization branch April 7, 2024 20:09
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.

None yet

2 participants