This project has moved and is read-only. For the latest updates, please go here.


problem concurrent access with getInstance


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


dahall wrote Feb 5, 2015 at 8: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 9: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 11:39 PM