Skip to content

Tags: NFig/NFig

Tags

v2.3.0

Toggle v2.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update version to v2.3.0

v2.2.1

Toggle v2.2.1's commit message
Fix race condition in initialization of `SettingsFactory`

In the ctor of `SettingsFactory` the call to `BuildSettings` enumerates the properties of the top-level type in parallel. That attempts to populate a cache containing delegates to generate `Setting` objects from `PropertyInfo` objects. However, that cache is a `Dictionary<TKey, TValue>` - any calls to `TryGetValue` are not thread-safe - the underlying buckets and entries are mutated as part of an insert or update operation on the dictionary. In this case the first call to `TryGetValue` was not protected by a lock around the critical section and so if another thread inserted a new entry the call to `TryGetValue` would occasionally fail with a `NullReferenceException` as the underlying buckets/entries were modified.

This commit changes the dictionary to be a `ConcurrentDictionary` and removes the need for a lock entirely. As this is only used during initialization of the settings the impact is minimal.

v2.1.0

Toggle v2.1.0's commit message
v2.1.0 - update to net462;netcoreapp2.0

- bring in build.ps1 and build.cmd
- update appveyor.yml

v2.0

Toggle v2.0's commit message

v1.0.0

Toggle v1.0.0's commit message

v0.9.1

Toggle v0.9.1's commit message

v1.1.1

Toggle v1.1.1's commit message

v1.1.0

Toggle v1.1.0's commit message