fix the queue type in use

LSLKeyTest
UbitUmarov 2015-12-09 16:12:21 +00:00
parent 447943302d
commit eccec66359
1 changed files with 8 additions and 7 deletions

View File

@ -99,8 +99,8 @@ namespace OpenSim.Region.ClientStack.Linden
private static Thread[] m_workerThreads = null; private static Thread[] m_workerThreads = null;
private static DoubleQueue<aPollRequest> m_queue = private static OpenSim.Framework.BlockingQueue<aPollRequest> m_queue =
new DoubleQueue<aPollRequest>(); new OpenSim.Framework.BlockingQueue<aPollRequest>();
private static int m_NumberScenes = 0; private static int m_NumberScenes = 0;
@ -181,7 +181,7 @@ namespace OpenSim.Region.ClientStack.Linden
"httpfetch", "httpfetch",
StatType.Pull, StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime, MeasuresOfInterest.AverageChangeOverTime,
stat => { stat.Value = m_queue.Count; }, stat => { stat.Value = m_queue.Count(); },
StatVerbosity.Debug); StatVerbosity.Debug);
StatsManager.RegisterStat(s_processedRequestsStat); StatsManager.RegisterStat(s_processedRequestsStat);
@ -332,9 +332,9 @@ namespace OpenSim.Region.ClientStack.Linden
} }
if (highPriority) if (highPriority)
m_queue.EnqueueHigh(reqinfo); m_queue.PriorityEnqueue(reqinfo);
else else
m_queue.EnqueueLow(reqinfo); m_queue.Enqueue(reqinfo);
}; };
NoEvents = (x, y) => NoEvents = (x, y) =>
@ -381,7 +381,8 @@ namespace OpenSim.Region.ClientStack.Linden
m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054"); m_log.WarnFormat("[FETCH INVENTORY DESCENDENTS2 MODULE]: Caught in the act of loosing responses! Please report this on mantis #7054");
responses[requestID] = response; responses[requestID] = response;
} }
requestinfo.folders.Clear();
requestinfo.request.Clear();
WebFetchInvDescModule.ProcessedRequestsCount++; WebFetchInvDescModule.ProcessedRequestsCount++;
} }
} }
@ -444,7 +445,7 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
Watchdog.UpdateThread(); Watchdog.UpdateThread();
aPollRequest poolreq = m_queue.Dequeue(); aPollRequest poolreq = m_queue.Dequeue(5000);
if (poolreq != null && poolreq.thepoll != null) if (poolreq != null && poolreq.thepoll != null)
{ {