aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-02-25 20:01:34 +0000
committerJustin Clark-Casey (justincc)2015-02-25 20:04:53 +0000
commit686b22da6e460c7869586e88332c981d7fbaf627 (patch)
tree9f464a15779300bc6c399c550038607a6812b061 /OpenSim/Framework/Monitoring
parentllLookAt(): use non-physical rotation if host prim is a physical attachment (diff)
downloadopensim-SC_OLD-686b22da6e460c7869586e88332c981d7fbaf627.zip
opensim-SC_OLD-686b22da6e460c7869586e88332c981d7fbaf627.tar.gz
opensim-SC_OLD-686b22da6e460c7869586e88332c981d7fbaf627.tar.bz2
opensim-SC_OLD-686b22da6e460c7869586e88332c981d7fbaf627.tar.xz
On shutdown (job engine stop), don't allow the ObjectDisposedException on BlockingCollection.Take() to propogate if the running thread checked IsRunning before the stop thread set it and disposed of the canellation source.
Looks to address http://opensimulator.org/mantis/view.php?id=7453
Diffstat (limited to 'OpenSim/Framework/Monitoring')
-rw-r--r--OpenSim/Framework/Monitoring/JobEngine.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs
index a32e4aa..6db9a67 100644
--- a/OpenSim/Framework/Monitoring/JobEngine.cs
+++ b/OpenSim/Framework/Monitoring/JobEngine.cs
@@ -161,7 +161,6 @@ namespace OpenSim.Framework.Monitoring
161 finally 161 finally
162 { 162 {
163 m_cancelSource.Dispose(); 163 m_cancelSource.Dispose();
164 m_jobQueue = null;
165 } 164 }
166 } 165 }
167 } 166 }
@@ -250,7 +249,19 @@ namespace OpenSim.Framework.Monitoring
250 { 249 {
251 while (IsRunning || m_jobQueue.Count > 0) 250 while (IsRunning || m_jobQueue.Count > 0)
252 { 251 {
253 CurrentJob = m_jobQueue.Take(m_cancelSource.Token); 252 try
253 {
254 CurrentJob = m_jobQueue.Take(m_cancelSource.Token);
255 }
256 catch (ObjectDisposedException e)
257 {
258 // If we see this whilst not running then it may be due to a race where this thread checks
259 // IsRunning after the stopping thread sets it to false and disposes of the cancellation source.
260 if (IsRunning)
261 throw e;
262 else
263 break;
264 }
254 265
255 if (LogLevel >= 1) 266 if (LogLevel >= 1)
256 m_log.DebugFormat("[{0}]: Processing job {1}", LoggingName, CurrentJob.Name); 267 m_log.DebugFormat("[{0}]: Processing job {1}", LoggingName, CurrentJob.Name);