From 5af108a029e5382f6a2f6d4d10b3d4de3a8f5245 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 21 May 2008 21:22:56 +0000 Subject: * 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. --- OpenSim/Region/Environment/Scenes/EventManager.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/EventManager.cs') diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 7ff9213..c6daa28 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs @@ -355,10 +355,16 @@ namespace OpenSim.Region.Environment.Scenes public void TriggerOnBackup(IRegionDataStore dstore) { handlerBackup = OnBackup; - if (handlerBackup != null) + Delegate[] items = OnBackup.GetInvocationList(); + foreach (OnBackupDelegate del in items) { - handlerBackup(dstore); + if (del != null) + del(dstore); } + //if (handlerBackup != null) + //{ + // handlerBackup(dstore); + //} } public void TriggerParcelPrimCountUpdate() -- cgit v1.1