diff options
author | Justin Clark-Casey (justincc) | 2014-07-16 22:58:38 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-07-16 22:58:38 +0100 |
commit | 8cd7ca568da35db5acef1db74970df3ebe11d714 (patch) | |
tree | d9176892ed89b9858dc328be0179cd6888c4de2a | |
parent | Update information in OpenSimDefaults to reflect the fact that ScriptStopStra... (diff) | |
download | opensim-SC-8cd7ca568da35db5acef1db74970df3ebe11d714.zip opensim-SC-8cd7ca568da35db5acef1db74970df3ebe11d714.tar.gz opensim-SC-8cd7ca568da35db5acef1db74970df3ebe11d714.tar.bz2 opensim-SC-8cd7ca568da35db5acef1db74970df3ebe11d714.tar.xz |
Change default script stop method to co-op instead of abort.
co-op should be more stable as it doesn't abort threads, which can trigger virtual machine instability
This change will be invisible to users as script DLLs are recompiled automatically where necessary, though the change won't take affect until the next simulator restart.
This change has no effect on existing script state.
If you want to continue using abort, set ScriptStopStrategy = abort in the [XEngine] section of OpenSim.ini
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 6 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 89f1c49..96da0a8 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -86,6 +86,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
86 | /// </summary> | 86 | /// </summary> |
87 | private int m_StartDelay; | 87 | private int m_StartDelay; |
88 | 88 | ||
89 | /// <summary> | ||
90 | /// Are we stopping scripts co-operatively by inserting checks in them at C# compile time (true) or aborting | ||
91 | /// their threads (false)? | ||
92 | /// </summary> | ||
89 | private bool m_coopTermination; | 93 | private bool m_coopTermination; |
90 | 94 | ||
91 | private int m_IdleTimeout; | 95 | private int m_IdleTimeout; |
@@ -242,7 +246,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
242 | m_ScriptConfig = configSource.Configs["XEngine"]; | 246 | m_ScriptConfig = configSource.Configs["XEngine"]; |
243 | m_ConfigSource = configSource; | 247 | m_ConfigSource = configSource; |
244 | 248 | ||
245 | string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "abort"); | 249 | string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "coop"); |
246 | 250 | ||
247 | m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy); | 251 | m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy); |
248 | 252 | ||
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 995768a..7ccc5fc 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1427,12 +1427,13 @@ | |||
1427 | ; DeleteScriptsOnStartup = false | 1427 | ; DeleteScriptsOnStartup = false |
1428 | 1428 | ||
1429 | ; Controls whether scripts are stopped by aborting their threads externally (abort) | 1429 | ; Controls whether scripts are stopped by aborting their threads externally (abort) |
1430 | ; or by co-operative checks inserted by OpenSimulator into compiled script (co-op) | 1430 | ; or by co-operative checks inserted by OpenSimulator into compiled script (co-op). |
1431 | ; co-op will be more stable but this option is currently experimental. | 1431 | ; co-op will be more stable as aborting threads can cause instability. |
1432 | ; abort was the default option in OpenSimulator 0.8 and before. | ||
1432 | ; If this setting is changed between co-op and abort, then existing scripts will automatically be recompiled if necessary. | 1433 | ; If this setting is changed between co-op and abort, then existing scripts will automatically be recompiled if necessary. |
1433 | ; However, the setting change will not take affect until the next time you restart the simulator. | 1434 | ; However, the setting change will not take affect until the next time you restart the simulator. |
1434 | ; Setting changes will not affect state information stored for scripts. | 1435 | ; Setting changes will not affect state information stored for scripts. |
1435 | ;ScriptStopStrategy = abort | 1436 | ScriptStopStrategy = co-op |
1436 | 1437 | ||
1437 | ; Rate to poll for asynchronous command replies (ms) | 1438 | ; Rate to poll for asynchronous command replies (ms) |
1438 | ; currently unused | 1439 | ; currently unused |