Skip to content

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

2 participants