aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 7e81be7..205426e 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -29,6 +29,7 @@ using log4net;
29using System; 29using System;
30using System.Threading; 30using System.Threading;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections.Concurrent;
32using System.IO; 33using System.IO;
33using System.Reflection; 34using System.Reflection;
34using System.Timers; 35using System.Timers;
@@ -352,8 +353,7 @@ namespace OpenSim.Services.Connectors
352 public string id; 353 public string id;
353 } 354 }
354 355
355 private OpenSim.Framework.BlockingQueue<QueuedAssetRequest> m_requestQueue = 356 private BlockingCollection<QueuedAssetRequest> m_requestQueue = new BlockingCollection<QueuedAssetRequest>();
356 new OpenSim.Framework.BlockingQueue<QueuedAssetRequest>();
357 357
358 private void AssetRequestProcessor() 358 private void AssetRequestProcessor()
359 { 359 {
@@ -361,10 +361,13 @@ namespace OpenSim.Services.Connectors
361 361
362 while (true) 362 while (true)
363 { 363 {
364 r = m_requestQueue.Dequeue(4500); 364 if(!m_requestQueue.TryTake(out r, 4500) || r == null)
365 Watchdog.UpdateThread(); 365 {
366 if(r== null) 366 Watchdog.UpdateThread();
367 continue; 367 continue;
368 }
369
370 Watchdog.UpdateThread();
368 string uri = r.uri; 371 string uri = r.uri;
369 string id = r.id; 372 string id = r.id;
370 373
@@ -432,7 +435,7 @@ namespace OpenSim.Services.Connectors
432 QueuedAssetRequest request = new QueuedAssetRequest(); 435 QueuedAssetRequest request = new QueuedAssetRequest();
433 request.id = id; 436 request.id = id;
434 request.uri = uri; 437 request.uri = uri;
435 m_requestQueue.Enqueue(request); 438 m_requestQueue.Add(request);
436 } 439 }
437 } 440 }
438 else 441 else