(another) quick question: In the various caches used for holding Query Plans, there's lots of code like this:
public object this[object key]
{
[MethodImpl(MethodImplOptions.Synchronized)]
get
{
lock (SyncRoot)
{
object result = softReferenceCache[key];
if (result != null)
{
strongReferenceCache.Add(key,
result);
}
return result;
}
}
}
Is there any good reason for the two locks? Seems to me to just be unnecessary
overhead, but I'm perhaps missing something subtle...
Cheers,
Steve
