aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
diff options
context:
space:
mode:
authorTedd Hansen2007-08-25 15:31:47 +0000
committerTedd Hansen2007-08-25 15:31:47 +0000
commit53be4774b32f6736373c1364c3bd659c977fbb4e (patch)
treec81bbc0d41b375bcc403c574da612d18b038c228 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
parentHopefully fixed the bugs in primitives rotation editing (diff)
downloadopensim-SC-53be4774b32f6736373c1364c3bd659c977fbb4e.zip
opensim-SC-53be4774b32f6736373c1364c3bd659c977fbb4e.tar.gz
opensim-SC-53be4774b32f6736373c1364c3bd659c977fbb4e.tar.bz2
opensim-SC-53be4774b32f6736373c1364c3bd659c977fbb4e.tar.xz
Scripts no longer crash sim after 5 minutes (override InitializeLifetimeService). Loading/Unloading of scripts are now handled in separate thread so server is no delayed because of this. Each script is loaded into a single AppDomain (temporary test for script unload, eats ~15KB more memory for each script). Unload of scripts has been verified to free up memory.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
index bfb8913..cb0f9ba 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
@@ -5,14 +5,33 @@ using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler;
5using OpenSim.Region.ScriptEngine.Common; 5using OpenSim.Region.ScriptEngine.Common;
6using System.Threading; 6using System.Threading;
7using System.Reflection; 7using System.Reflection;
8 8using System.Runtime.Remoting.Lifetime;
9 9
10namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL 10namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
11{ 11{
12 public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript 12 public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript
13 { 13 {
14
15 // Object never expires
16 public override Object InitializeLifetimeService()
17 {
18 Console.WriteLine("LSL_BaseClass: InitializeLifetimeService()");
19 // return null;
20 ILease lease = (ILease)base.InitializeLifetimeService();
21
22 if (lease.CurrentState == LeaseState.Initial)
23 {
24 lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1);
25 //lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
26 //lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
27 }
28 return lease;
29 }
30
31
14 private Executor m_Exec; 32 private Executor m_Exec;
15 public Executor Exec { 33 public Executor Exec
34 {
16 get 35 get
17 { 36 {
18 if (m_Exec == null) 37 if (m_Exec == null)