Convert some remaining legacy lock()s for m_parts in SceneObjectGroup to ReaderWriteLockSlim, hopefully fixes a native crash
parent
a6c93ce875
commit
19a5e606b3
|
@ -46,12 +46,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ForceInventoryPersistence()
|
public void ForceInventoryPersistence()
|
||||||
{
|
{
|
||||||
lock (m_parts)
|
lockPartsForRead(true);
|
||||||
|
List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
|
||||||
|
lockPartsForRead(false);
|
||||||
|
foreach (SceneObjectPart part in values)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
part.Inventory.ForceInventoryPersistence();
|
||||||
{
|
|
||||||
part.Inventory.ForceInventoryPersistence();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,14 +75,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Stop the scripts contained in all the prims in this group
|
/// Stop the scripts contained in all the prims in this group
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RemoveScriptInstances()
|
public void RemoveScriptInstances()
|
||||||
{
|
{
|
||||||
lock (m_parts)
|
lockPartsForRead(true);
|
||||||
|
List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
|
||||||
|
lockPartsForRead(false);
|
||||||
|
|
||||||
|
foreach (SceneObjectPart part in values)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
part.Inventory.RemoveScriptInstances();
|
||||||
{
|
|
||||||
part.Inventory.RemoveScriptInstances();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue