> On .NET exception doesn't occur. I will try to make some tests.
OK, I did a litle investigation and finally found a problem. The
method that's causing the issue is:
AllComponentsReleasePolicy.Release
it locks rwLock then it fetches Burden object for instance, upgrades
lock to writer and calls burden.Release(). This in turn again tries to
lock rwLock and upgrades it to writer lock. When the turn comes for
releasing objects, .NET will do mono won't. The simple solution I came
up with is to change this method to:
public void Release(object instance)
{
Burden burden = null;
rwLock.AcquireReaderLock(Timeout.Infinite);
try
{
burden = (Burden) instance2Burden[instance];
if (burden == null)
return;
LockCookie cookie =
rwLock.UpgradeToWriterLock(Timeout.Infinite);
try
{
burden = (Burden)
instance2Burden[instance];
if (burden == null)
return;
instance2Burden.Remove(instance);
}
finally
{
rwLock.DowngradeFromWriterLock(ref
cookie);
}
}
finally
{
rwLock.ReleaseReaderLock();
}
if(burden != null)
{
burden.Release (this);
}
}
I will report this bug to mono team.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---