Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
This commit is contained in:
Melanie
2013-07-13 00:57:03 +01:00
8 changed files with 189 additions and 35 deletions

View File

@@ -242,7 +242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
if (Engine.Config.GetString("ScriptStopStrategy", "abort") == "co-op")
{
m_coopTermination = true;
m_coopSleepHandle = new AutoResetEvent(false);
m_coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset);
}
}
@@ -1221,4 +1221,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
Suspended = false;
}
}
}
/// <summary>
/// Xengine event wait handle.
/// </summary>
/// <remarks>
/// This class exists becase XEngineScriptBase gets a reference to this wait handle. We need to make sure that
/// when scripts are running in different AppDomains the lease does not expire.
/// FIXME: Like LSL_Api, etc., this effectively leaks memory since the GC will never collect it. To avoid this,
/// proper remoting sponsorship needs to be implemented across the board.
/// </remarks>
public class XEngineEventWaitHandle : EventWaitHandle
{
public XEngineEventWaitHandle(bool initialState, EventResetMode mode) : base(initialState, mode) {}
public override Object InitializeLifetimeService()
{
return null;
}
}
}