diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d47fd6b..cee10a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -192,7 +192,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
192 | { | 192 | { |
193 | if (m_coopSleepHandle == null) | 193 | if (m_coopSleepHandle == null) |
194 | System.Threading.Thread.Sleep(delay); | 194 | System.Threading.Thread.Sleep(delay); |
195 | else if (m_coopSleepHandle.WaitOne(delay)) | 195 | else |
196 | CheckForCoopTermination(delay); | ||
197 | } | ||
198 | |||
199 | /// <summary> | ||
200 | /// Check for co-operative termination. | ||
201 | /// </summary> | ||
202 | /// <param name='delay'>If called with 0, then just the check is performed with no wait.</param> | ||
203 | protected virtual void CheckForCoopTermination(int delay) | ||
204 | { | ||
205 | if (m_coopSleepHandle.WaitOne(delay)) | ||
196 | throw new ScriptCoopStopException(); | 206 | throw new ScriptCoopStopException(); |
197 | } | 207 | } |
198 | 208 | ||