Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking

This commit is contained in:
Justin Clark-Casey (justincc)
2010-08-26 00:08:53 +01:00
parent 22fd00b002
commit 8031f8ec09
23 changed files with 912 additions and 747 deletions

View File

@@ -360,10 +360,13 @@ namespace OpenSim.Data.SQLite
lock (ds)
{
foreach (SceneObjectPart prim in obj.Children.Values)
lock (obj.Children)
{
// m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
foreach (SceneObjectPart prim in obj.Children.Values)
{
// m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
}
}
}