Eat a lockign exception that kills scripts. May bear more investigation

in the long run.
avinationmerge
Melanie Thielker 2010-07-25 08:11:39 +02:00
parent 83aec1ec94
commit 516ec4acd0
1 changed files with 11 additions and 2 deletions

View File

@ -136,13 +136,22 @@ namespace OpenSim.Region.Framework.Scenes
if (m_partsLock.RecursiveReadCount > 0) if (m_partsLock.RecursiveReadCount > 0)
{ {
m_log.Error("[SceneObjectGroup.m_parts] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue."); m_log.Error("[SceneObjectGroup.m_parts] Recursive read lock requested. This should not happen and means something needs to be fixed. For now though, it's safe to continue.");
try
{
m_partsLock.ExitReadLock(); m_partsLock.ExitReadLock();
} }
catch { } // Ignore errors, to allow resync
}
if (m_partsLock.RecursiveWriteCount > 0) if (m_partsLock.RecursiveWriteCount > 0)
{ {
m_log.Error("[SceneObjectGroup.m_parts] Recursive read lock requested (write lock exists on this thread). This should not happen and means something needs to be fixed."); m_log.Error("[SceneObjectGroup.m_parts] Recursive read lock requested (write lock exists on this thread). This should not happen and means something needs to be fixed.");
try
{
m_partsLock.ExitWriteLock(); m_partsLock.ExitWriteLock();
} }
catch { }
}
while (!m_partsLock.TryEnterReadLock(60000)) while (!m_partsLock.TryEnterReadLock(60000))
{ {