diff options
author | UbitUmarov | 2017-05-23 05:59:14 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-23 05:59:14 +0100 |
commit | e1aa591815f451f4fcf7eb49065d8e300141d9bf (patch) | |
tree | 35377aeee67ad3c1d77387108564871cf7369ba8 | |
parent | protect AsyncCommandManager thread from fails on the several things it checks (diff) | |
download | opensim-SC-e1aa591815f451f4fcf7eb49065d8e300141d9bf.zip opensim-SC-e1aa591815f451f4fcf7eb49065d8e300141d9bf.tar.gz opensim-SC-e1aa591815f451f4fcf7eb49065d8e300141d9bf.tar.bz2 opensim-SC-e1aa591815f451f4fcf7eb49065d8e300141d9bf.tar.xz |
allow new thread creation if it was aborted on AsyncCommandManager
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index cefd39e..4714275 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -182,9 +182,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
182 | if (cmdHandlerThread == null) | 182 | if (cmdHandlerThread == null) |
183 | { | 183 | { |
184 | // Start the thread that will be doing the work | 184 | // Start the thread that will be doing the work |
185 | cmdHandlerThread | 185 | lock (staticLock) |
186 | = WorkManager.StartThread( | 186 | { |
187 | cmdHandlerThread = WorkManager.StartThread( | ||
187 | CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true); | 188 | CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true); |
189 | } | ||
188 | } | 190 | } |
189 | } | 191 | } |
190 | 192 | ||
@@ -210,7 +212,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
210 | if (cmdHandlerThread.IsAlive == true) | 212 | if (cmdHandlerThread.IsAlive == true) |
211 | { | 213 | { |
212 | cmdHandlerThread.Abort(); | 214 | cmdHandlerThread.Abort(); |
213 | //cmdHandlerThread.Join(); | 215 | //cmdHandlerThread.Join(); |
216 | cmdHandlerThread = null; | ||
214 | } | 217 | } |
215 | } | 218 | } |
216 | } | 219 | } |