Possible concurrency issue in StructureMap.Util.Cache, version 3.1.6 #512
Comments
That all went away if you move up to StructureMap 4.*.
|
Unfortunately we are stuck with version 3 due to dependencies |
If you want, I can take a pull request to the 3.1 branch and push another update:https://github.com/structuremap/structuremap/commits/3.1 In 4, the |
So you think it is possible to backport the |
This was done. |
Hi, I am investigating a very strange issue in our production environment, and this led me to check the StructureMap.Util.Cache class (https://github.com/structuremap/structuremap/blob/1075e6f49a8b9b15aa86e16bf4a15425421e2450/src/StructureMap/Util/Cache.cs)
Most of the methods will take the lock represented by
_rwLock
, but the indexer and theGetEnumerator()
implementations will not (and if the indexer did take it,GetValue()
takes the lock twice in succession so it is not atomic).Is this an issue? Looks like it to me.
The text was updated successfully, but these errors were encountered: