From 615e64696f4120c8e832c61d1b5dd766b9c90ce7 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 2 Jun 2008 17:54:43 +0000 Subject: * experimental: Once we've received all the required assets from the asset service, launch the actual writing of the archive on a separate thread (to stop tieing up the asset cache received notifier thread) --- .../Modules/World/Archiver/ArchiveWriteRequest.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequest.cs index 86ee753..935a17f 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequest.cs @@ -32,6 +32,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser; using OpenSim.Region.Environment.Scenes; using System.Collections.Generic; using System.Reflection; +using System.Threading; using libsecondlife; using log4net; using Nini.Config; @@ -216,8 +217,19 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver if (m_assets.Count == m_repliesRequired) { - m_assetsRequestCallback(m_assets); + // We want to stop using the asset cache thread asap as we now need to do the actual work of producing the archive + Thread newThread = new Thread(PerformAssetsRequestCallback); + newThread.Name = "OpenSimulator archiving thread post assets receipt"; + newThread.Start(); } } + + /// + /// Perform the callback on the original requester of the assets + /// + protected void PerformAssetsRequestCallback() + { + m_assetsRequestCallback(m_assets); + } } } -- cgit v1.1