* 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)
parent
4453c8bc5c
commit
615e64696f
|
@ -32,6 +32,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -215,9 +216,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||||
m_assets[assetID] = asset;
|
m_assets[assetID] = asset;
|
||||||
|
|
||||||
if (m_assets.Count == m_repliesRequired)
|
if (m_assets.Count == m_repliesRequired)
|
||||||
|
{
|
||||||
|
// 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);
|
m_assetsRequestCallback(m_assets);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue