aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Interfaces
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-12-17 21:37:02 +0000
committerJustin Clark-Casey (justincc)2012-12-17 21:37:02 +0000
commite6fd8365af0b0dc7a4664278c369752cb4e87155 (patch)
tree194233d93d9518ffc3ee1419e7ed6859cba72d77 /OpenSim/Region/ScriptEngine/Interfaces
parentBulletSim: fix vehicles being shot in the air at border crossings because of ... (diff)
downloadopensim-SC_OLD-e6fd8365af0b0dc7a4664278c369752cb4e87155.zip
opensim-SC_OLD-e6fd8365af0b0dc7a4664278c369752cb4e87155.tar.gz
opensim-SC_OLD-e6fd8365af0b0dc7a4664278c369752cb4e87155.tar.bz2
opensim-SC_OLD-e6fd8365af0b0dc7a4664278c369752cb4e87155.tar.xz
Extend default 1 second wait for event completion to other thread script reset (as called by llResetOtherScript()).
As with script stop (via llDie()) aborting other scripts event threads, llResetOtherScript() can also abort any current event thread on another script. On mono 2.6, 2.10 and possibly later this may cause locking problems in certain code areas. This commit reuses the recently introduced [XEngine] WaitForEventCompletionOnScriptStop to make this a 1 sec timeout, rather than 0 secs.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 00a99c3..2f5b526 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -147,7 +147,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
147 /// <summary> 147 /// <summary>
148 /// Stop the script instance. 148 /// Stop the script instance.
149 /// </summary> 149 /// </summary>
150 /// <remarks>
151 /// This must not be called by a thread that is in the process of handling an event for this script. Otherwise
152 /// there is a danger that it will self-abort and not complete the reset.
153 /// </remarks>
150 /// <param name="timeout"></param> 154 /// <param name="timeout"></param>
155 /// How many milliseconds we will wait for an existing script event to finish before
156 /// forcibly aborting that event.
151 /// <returns>true if the script was successfully stopped, false otherwise</returns> 157 /// <returns>true if the script was successfully stopped, false otherwise</returns>
152 bool Stop(int timeout); 158 bool Stop(int timeout);
153 159
@@ -169,8 +175,31 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
169 object EventProcessor(); 175 object EventProcessor();
170 176
171 int EventTime(); 177 int EventTime();
172 void ResetScript(); 178
179 /// <summary>
180 /// Reset the script.
181 /// </summary>
182 /// <remarks>
183 /// This must not be called by a thread that is in the process of handling an event for this script. Otherwise
184 /// there is a danger that it will self-abort and not complete the reset. Such a thread must call
185 /// ApiResetScript() instead.
186 /// </remarks>
187 /// <param name='timeout'>
188 /// How many milliseconds we will wait for an existing script event to finish before
189 /// forcibly aborting that event prior to script reset.
190 /// </param>
191 void ResetScript(int timeout);
192
193 /// <summary>
194 /// Reset the script.
195 /// </summary>
196 /// <remarks>
197 /// This must not be called by any thread other than the one executing the scripts current event. This is
198 /// because there is no wait or abort logic if another thread is in the middle of processing a script event.
199 /// Such an external thread should use ResetScript() instead.
200 /// </remarks>
173 void ApiResetScript(); 201 void ApiResetScript();
202
174 Dictionary<string, object> GetVars(); 203 Dictionary<string, object> GetVars();
175 void SetVars(Dictionary<string, object> vars); 204 void SetVars(Dictionary<string, object> vars);
176 DetectParams GetDetectParams(int idx); 205 DetectParams GetDetectParams(int idx);