* 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)

0.6.0-stable
Justin Clarke Casey 2008-06-02 17:54:43 +00:00
parent 4453c8bc5c
commit 615e64696f
1 changed files with 13 additions and 1 deletions

View File

@ -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();
}
}
/// <summary>
/// Perform the callback on the original requester of the assets
/// </summary>
protected void PerformAssetsRequestCallback()
{
m_assetsRequestCallback(m_assets);
}
}
}