diff options
author | Justin Clark-Casey (justincc) | 2015-01-16 23:55:00 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-16 23:55:11 +0000 |
commit | faaf47a86f34f24dec0d7d51eda638d0df3db305 (patch) | |
tree | 999a9351ae53e4ecc0b465e8e1bea744cb335837 /OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |
parent | For scripts in attachments, don't save .state files apart from the initial on... (diff) | |
download | opensim-SC_OLD-faaf47a86f34f24dec0d7d51eda638d0df3db305.zip opensim-SC_OLD-faaf47a86f34f24dec0d7d51eda638d0df3db305.tar.gz opensim-SC_OLD-faaf47a86f34f24dec0d7d51eda638d0df3db305.tar.bz2 opensim-SC_OLD-faaf47a86f34f24dec0d7d51eda638d0df3db305.tar.xz |
Prevent a race condition between the script engine backup thread and script removal by locking on the script's EventQueue and only proceeding if it's flagged as still running.
Relates to http://opensimulator.org/mantis/view.php?id=7407
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 35e5f18..fa2ceef 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |||
@@ -178,8 +178,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
178 | /// <param name="timeout"></param> | 178 | /// <param name="timeout"></param> |
179 | /// How many milliseconds we will wait for an existing script event to finish before | 179 | /// How many milliseconds we will wait for an existing script event to finish before |
180 | /// forcibly aborting that event. | 180 | /// forcibly aborting that event. |
181 | /// <param name="clearEventQueue">If true then the event queue is also cleared</param> | ||
181 | /// <returns>true if the script was successfully stopped, false otherwise</returns> | 182 | /// <returns>true if the script was successfully stopped, false otherwise</returns> |
182 | bool Stop(int timeout); | 183 | bool Stop(int timeout, bool clearEventQueue = false); |
183 | 184 | ||
184 | void SetState(string state); | 185 | void SetState(string state); |
185 | 186 | ||