Skip to content

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
@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.

2 participants