diff options
-rw-r--r-- | OpenSim/Framework/Monitoring/JobEngine.cs | 7 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Framework/Monitoring/JobEngine.cs b/OpenSim/Framework/Monitoring/JobEngine.cs index 0a39e4b..a6a059d 100644 --- a/OpenSim/Framework/Monitoring/JobEngine.cs +++ b/OpenSim/Framework/Monitoring/JobEngine.cs | |||
@@ -136,12 +136,15 @@ namespace OpenSim.Framework.Monitoring | |||
136 | if(m_jobQueue.Count <= 0) | 136 | if(m_jobQueue.Count <= 0) |
137 | m_cancelSource.Cancel(); | 137 | m_cancelSource.Cancel(); |
138 | 138 | ||
139 | if(m_finishedProcessingAfterStop.WaitOne(RequestProcessTimeoutOnStop)) | 139 | m_finishedProcessingAfterStop.WaitOne(RequestProcessTimeoutOnStop); |
140 | m_finishedProcessingAfterStop.Close(); | 140 | m_finishedProcessingAfterStop.Close(); |
141 | } | 141 | } |
142 | finally | 142 | finally |
143 | { | 143 | { |
144 | m_cancelSource.Dispose(); | 144 | if(m_cancelSource != null) |
145 | m_cancelSource.Dispose(); | ||
146 | if(m_finishedProcessingAfterStop != null) | ||
147 | m_finishedProcessingAfterStop.Dispose(); | ||
145 | } | 148 | } |
146 | } | 149 | } |
147 | } | 150 | } |
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 2deb2d1..7e81be7 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -34,7 +34,7 @@ using System.Reflection; | |||
34 | using System.Timers; | 34 | using System.Timers; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Monitoring; |
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | 40 | ||
@@ -135,7 +135,11 @@ namespace OpenSim.Services.Connectors | |||
135 | 135 | ||
136 | for (int i = 0 ; i < 2 ; i++) | 136 | for (int i = 0 ; i < 2 ; i++) |
137 | { | 137 | { |
138 | Util.FireAndForget(delegate { AssetRequestProcessor();}); | 138 | m_fetchThreads[i] = WorkManager.StartThread(AssetRequestProcessor, |
139 | String.Format("GetTextureWorker{0}", i), | ||
140 | ThreadPriority.Normal, | ||
141 | true, | ||
142 | false); | ||
139 | } | 143 | } |
140 | } | 144 | } |
141 | 145 | ||
@@ -357,7 +361,8 @@ namespace OpenSim.Services.Connectors | |||
357 | 361 | ||
358 | while (true) | 362 | while (true) |
359 | { | 363 | { |
360 | r = m_requestQueue.Dequeue(2000); | 364 | r = m_requestQueue.Dequeue(4500); |
365 | Watchdog.UpdateThread(); | ||
361 | if(r== null) | 366 | if(r== null) |
362 | continue; | 367 | continue; |
363 | string uri = r.uri; | 368 | string uri = r.uri; |