diff options
author | Justin Clark-Casey (justincc) | 2012-07-10 21:42:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-10 21:42:51 +0100 |
commit | eb5ec4a78698a3b1fd6d581c800ac985d5d946fa (patch) | |
tree | 843db5bd29e52f983ece797e56ea9347b9489a4d /OpenSim/Region/ScriptEngine | |
parent | This script allows an object to be attached directly from prim inventory to a... (diff) | |
download | opensim-SC_OLD-eb5ec4a78698a3b1fd6d581c800ac985d5d946fa.zip opensim-SC_OLD-eb5ec4a78698a3b1fd6d581c800ac985d5d946fa.tar.gz opensim-SC_OLD-eb5ec4a78698a3b1fd6d581c800ac985d5d946fa.tar.bz2 opensim-SC_OLD-eb5ec4a78698a3b1fd6d581c800ac985d5d946fa.tar.xz |
If a script is being stopped manually, then give the scriptpool thread 1 second to finish normally before forcibly aborting.
This is to avoid the worst of the problems in mono 2.6, 2.10 where an aborted thread does not always release all its locks.
This very short grace period is identical to the existing behaviour when a script is removed from the scene.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 7f3bd76..efcae94 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1574,7 +1574,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1574 | { | 1574 | { |
1575 | IScriptInstance instance = GetInstance(itemID); | 1575 | IScriptInstance instance = GetInstance(itemID); |
1576 | if (instance != null) | 1576 | if (instance != null) |
1577 | instance.Stop(0); | 1577 | { |
1578 | // Give the script some time to finish processing its last event. Simply aborting the script thread can | ||
1579 | // cause issues on mono 2.6, 2.10 and possibly later where locks are not released properly on abort. | ||
1580 | instance.Stop(1000); | ||
1581 | } | ||
1578 | } | 1582 | } |
1579 | 1583 | ||
1580 | public DetectParams GetDetectParams(UUID itemID, int idx) | 1584 | public DetectParams GetDetectParams(UUID itemID, int idx) |