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

Remove synchronization from CsvMapper #468

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

pjfanning
Copy link
Member

LRUMap can handle concurrent gets and puts.

The existing code does not stop 2 threads from getting null from the initial get and both creating new schemas and putting them to the LRUMap with the same key. We would need a more complicated solution to ensure that schemas were only created once. I don't think that we need that - the code is a good effort at avoiding creating schema instances over and over while avoiding the locking required to make it happen once and once only.

@cowtowncoder cowtowncoder merged commit d5ccb0c into FasterXML:2.18 Mar 28, 2024
4 checks passed
@cowtowncoder cowtowncoder changed the title remove synchronization from CsvMapper Remove synchronization from CsvMapper Mar 28, 2024
cowtowncoder added a commit that referenced this pull request Mar 28, 2024
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