Run slow operations in a separate thread, instead of using FireAndForget (which has a 1-minute timeout)

Resolves http://opensimulator.org/mantis/view.php?id=6945
This commit is contained in:
Oren Hurvitz
2014-01-29 16:14:27 +02:00
parent 84d7227dfd
commit e131e73652
7 changed files with 35 additions and 12 deletions

View File

@@ -1509,7 +1509,7 @@ namespace OpenSim.Region.Framework.Scenes
{
tmpMS = Util.EnvironmentTickCount();
m_cleaningTemps = true;
Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
Util.RunThreadNoTimeout(delegate { CleanTempObjects(); m_cleaningTemps = false; }, "CleanTempObjects", null);
tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS);
}
@@ -1682,7 +1682,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!m_backingup)
{
m_backingup = true;
Util.FireAndForget(BackupWaitCallback);
Util.RunThreadNoTimeout(BackupWaitCallback, "BackupWaitCallback", null);
}
}
@@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
/// Wrapper for Backup() that can be called with Util.FireAndForget()
/// Wrapper for Backup() that can be called with Util.RunThreadNoTimeout()
/// </summary>
private void BackupWaitCallback(object o)
{

View File

@@ -3201,7 +3201,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SendInitialDataToMe()
{
// Send all scene object to the new client
Util.FireAndForget(delegate
Util.RunThreadNoTimeout(delegate
{
// we created a new ScenePresence (a new child agent) in a fresh region.
// Request info about all the (root) agents in this region
@@ -3216,7 +3216,7 @@ namespace OpenSim.Region.Framework.Scenes
((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
}
});
}, "SendInitialDataToMe", null);
}
/// <summary>