add locking to internal queue in WebFetchInvDescModule; lack of which caused a random crash in a load test yesterday

cpu-performance
dahlia 2013-07-16 01:31:09 -07:00
parent 42e2a0d66e
commit 70aa77f520
1 changed files with 10 additions and 5 deletions

View File

@ -254,10 +254,13 @@ namespace OpenSim.Region.ClientStack.Linden
} }
} }
lock (m_queue)
{
if (highPriority) if (highPriority)
m_queue.EnqueueHigh(reqinfo); m_queue.EnqueueHigh(reqinfo);
else else
m_queue.EnqueueLow(reqinfo); m_queue.EnqueueLow(reqinfo);
}
}; };
NoEvents = (x, y) => NoEvents = (x, y) =>
@ -345,7 +348,9 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
Watchdog.UpdateThread(); Watchdog.UpdateThread();
aPollRequest poolreq = m_queue.Dequeue(); aPollRequest poolreq = null;
lock (m_queue)
poolreq = m_queue.Dequeue();
if (poolreq != null && poolreq.thepoll != null) if (poolreq != null && poolreq.thepoll != null)
poolreq.thepoll.Process(poolreq); poolreq.thepoll.Process(poolreq);