NightOwl888 / ICU4N

International Components for Unicode for .NET
Apache License 2.0
26 stars 7 forks source link

Verify ConcurrentDictionary use, taking into account GetOrAdd can call creation callback more than once #31

Closed NightOwl888 closed 3 years ago

NightOwl888 commented 3 years ago

See https://github.com/apache/lucenenet/issues/417 for a more complete description.

This issue also applies to the GetOrCreate() method of SoftCache, which should be reviewed.

It is suspected that this may be the source of concurrency issues with ThaiTokenizer and ICUTokenizer tests of Lucene.NET, which are known to fail without extra locking that was not part of the original design.