* This update causes the backup process to run in a separate thread.

* Concurrency issues are resolved because each object makes a memory-only copy of itself and backs up the copy.
* Because of the way this is done, the latest at the time of the backup gets backed up (no functionality change)
* You can move *thousands of objects at a time* and the sim doesn't freeze and wait for the backup to complete.
* This can be enhanced more by dedicating the thread as opposed to starting it when the backup process starts.
This commit is contained in:
Teravus Ovares
2008-05-21 21:22:56 +00:00
parent 3e997772ea
commit 5af108a029
6 changed files with 87 additions and 39 deletions

View File

@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Scenes
}
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values);
TaskInventory.Clear();
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Scenes
}
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values);
foreach (TaskInventoryItem item in items)
{
@@ -304,6 +304,7 @@ namespace OpenSim.Region.Environment.Scenes
m_inventorySerial++;
//m_inventorySerial += 2;
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
}
/// <summary>
@@ -373,6 +374,7 @@ namespace OpenSim.Region.Environment.Scenes
TriggerScriptChangedEvent(Changed.INVENTORY);
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
return true;
}
@@ -411,6 +413,7 @@ namespace OpenSim.Region.Environment.Scenes
TriggerScriptChangedEvent(Changed.INVENTORY);
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
int scriptcount = 0;
lock (m_taskInventory)