aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine
diff options
context:
space:
mode:
authorMelanie2012-03-15 10:55:44 +0000
committerMelanie2012-03-15 10:55:44 +0000
commit897dc5e77eff911f9dd8870535c442f632d17662 (patch)
tree4bd4606e27f4c346f0267f6fc03c4541a2dc7046 /OpenSim/Region/ScriptEngine/XEngine
parentAllow llTeleportAgent to teleport gods when not in god mode (diff)
parentRemove property/field duplication in ScriptInstance where it's unnecessary. (diff)
downloadopensim-SC_OLD-897dc5e77eff911f9dd8870535c442f632d17662.zip
opensim-SC_OLD-897dc5e77eff911f9dd8870535c442f632d17662.tar.gz
opensim-SC_OLD-897dc5e77eff911f9dd8870535c442f632d17662.tar.bz2
opensim-SC_OLD-897dc5e77eff911f9dd8870535c442f632d17662.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 1d3ba6c..ee5f519 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -244,12 +244,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
244 get { return m_ConfigSource; } 244 get { return m_ConfigSource; }
245 } 245 }
246 246
247 /// <summary>
248 /// Event fired after the script engine has finished removing a script.
249 /// </summary>
247 public event ScriptRemoved OnScriptRemoved; 250 public event ScriptRemoved OnScriptRemoved;
251
252 /// <summary>
253 /// Event fired after the script engine has finished removing a script from an object.
254 /// </summary>
248 public event ObjectRemoved OnObjectRemoved; 255 public event ObjectRemoved OnObjectRemoved;
249 256
250 //
251 // IRegionModule functions
252 //
253 public void Initialise(IConfigSource configSource) 257 public void Initialise(IConfigSource configSource)
254 { 258 {
255 if (configSource.Configs["XEngine"] == null) 259 if (configSource.Configs["XEngine"] == null)
@@ -1199,7 +1203,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1199 m_Scripts.Remove(itemID); 1203 m_Scripts.Remove(itemID);
1200 lockScriptsForWrite(false); 1204 lockScriptsForWrite(false);
1201 instance.ClearQueue(); 1205 instance.ClearQueue();
1202 instance.Stop(0); 1206
1207 // Give the script some time to finish processing its last event. Simply aborting the script thread can
1208 // cause issues on mono 2.6, 2.10 and possibly later where locks are not released properly on abort.
1209 instance.Stop(1000);
1203 1210
1204// bool objectRemoved = false; 1211// bool objectRemoved = false;
1205 1212
@@ -1231,8 +1238,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1231 UnloadAppDomain(instance.AppDomain); 1238 UnloadAppDomain(instance.AppDomain);
1232 } 1239 }
1233 1240
1234 instance = null;
1235
1236 ObjectRemoved handlerObjectRemoved = OnObjectRemoved; 1241 ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
1237 if (handlerObjectRemoved != null) 1242 if (handlerObjectRemoved != null)
1238 { 1243 {