* refactor: Make SOG itself responsible for checking whether it's already been deleted on an update request from the regular sweep

0.6.0-stable
Justin Clarke Casey 2008-09-06 01:10:47 +00:00
parent 88cdd266ef
commit 03581c17e6
2 changed files with 10 additions and 12 deletions

View File

@ -141,9 +141,8 @@ namespace OpenSim.Region.Environment.Scenes
List<EntityBase> updateEntities = GetEntities();
foreach (EntityBase entity in updateEntities)
{
if (!entity.IsDeleted)
entity.Update();
{
entity.Update();
}
}
@ -327,15 +326,7 @@ namespace OpenSim.Region.Environment.Scenes
// Don't abort the whole update if one entity happens to give us an exception.
try
{
// Check that the group was not deleted before the scheduled update
// FIXME: This is merely a temporary measure to reduce the incidence of failure, when
// an object has been deleted from a scene before update was processed.
// A more fundamental overhaul of the update mechanism is required to eliminate all
// the race conditions.
if (!entity.IsDeleted)
{
m_updateList[i].Update();
}
m_updateList[i].Update();
}
catch (Exception e)
{

View File

@ -1478,6 +1478,13 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public override void Update()
{
// Check that the group was not deleted before the scheduled update
// FIXME: This is merely a temporary measure to reduce the incidence of failure when
// an object has been deleted from a scene before update was processed.
// A more fundamental overhaul of the update mechanism is required to eliminate all
// the race conditions.
if (m_isDeleted)
return;
lock (m_parts)
{