-
Notifications
You must be signed in to change notification settings - Fork 483
Closed
Milestone
Description
I can't figure out
a) why it tests internalsVisibleToDynamicProxy.ContainsKey() again after Upgrading the lock.
b) why it doesn't do the first codepath with a non-upgradeable read lock, similar to BaseProxyGenerator, although maybe a reasonable answer could be they have different expectations on how likely they are to need to upgrade the lock...
internal static bool AreInternalsVisibleToDynamicProxy(Assembly asm)
{
using (var locker = internalsVisibleToDynamicProxyLock.ForReadingUpgradeable())
{
if (internalsVisibleToDynamicProxy.ContainsKey(asm))
{
return internalsVisibleToDynamicProxy[asm];
}
locker.Upgrade();
if (internalsVisibleToDynamicProxy.ContainsKey(asm))
{
return internalsVisibleToDynamicProxy[asm];
}
Metadata
Metadata
Assignees
Labels
No labels