Fix to existing ReaderWriterLockSlim implementations

This commit is contained in:
CasperW
2009-12-06 17:23:07 +01:00
parent 1e222d52e6
commit 172e2f4e76
4 changed files with 26 additions and 7 deletions

View File

@@ -109,7 +109,10 @@ namespace OpenSim.Framework
}
else
{
m_itemLock.ExitReadLock();
if (m_itemLock.RecursiveReadCount>0)
{
m_itemLock.ExitReadLock();
}
}
}
@@ -144,7 +147,10 @@ namespace OpenSim.Framework
}
else
{
m_itemLock.ExitWriteLock();
if (m_itemLock.RecursiveWriteCount > 0)
{
m_itemLock.ExitWriteLock();
}
}
}