This project has moved. For the latest updates, please go here.
1

Closed

problem concurrent access with getInstance

description

when calling TimeSpan2FormatInfo.CurrentInfo twice in the same time, it is crashing beacause of an already existing key.
Closed Feb 7, 2015 at 10:39 PM by dahall
The concurrency problem is fixed in version 2.0.5.

comments

dahall wrote Feb 5, 2015 at 7:55 PM

kevinkazic: I saw the patch file you uploaded. Thank you. Will you tell me which files you updated so I can update the project source and roll the version?

kevinkazic wrote Feb 5, 2015 at 8:56 PM

modified file: TimeSpanFormatInfo.cs
cache.Add => cache[info2.LCID] = tsInfo
fullPatternCache.Add => fullPatternCache[pattern] = m;

it does not throw exception but it is not thread safe. but it does the job.

wrote Feb 7, 2015 at 10:39 PM