mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* 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)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user