mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Add Thread.ResetAbort() to various thread loops to clean up errors on
shutdown. Fixes Mantis #8494. Threads are aborted when shutting down and ThreadAbortException is odd in that it is rethrown at the end of the catch unless the abort is reset. No functional changes but fewer error messages on shutdown.
This commit is contained in:
25
OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs
Normal file → Executable file
25
OpenSim/Region/ClientStack/Linden/Caps/GetAssetsModule.cs
Normal file → Executable file
@@ -204,19 +204,26 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
|
||||
private static void DoAssetRequests()
|
||||
{
|
||||
while (m_NumberScenes > 0)
|
||||
try
|
||||
{
|
||||
APollRequest poolreq;
|
||||
if(m_queue.TryTake(out poolreq, 4500))
|
||||
while (m_NumberScenes > 0)
|
||||
{
|
||||
if (m_NumberScenes <= 0)
|
||||
break;
|
||||
APollRequest poolreq;
|
||||
if (m_queue.TryTake(out poolreq, 4500))
|
||||
{
|
||||
if (m_NumberScenes <= 0)
|
||||
break;
|
||||
Watchdog.UpdateThread();
|
||||
if (poolreq.reqID != UUID.Zero)
|
||||
poolreq.thepoll.Process(poolreq);
|
||||
poolreq = null;
|
||||
}
|
||||
Watchdog.UpdateThread();
|
||||
if (poolreq.reqID != UUID.Zero)
|
||||
poolreq.thepoll.Process(poolreq);
|
||||
poolreq = null;
|
||||
}
|
||||
Watchdog.UpdateThread();
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
Thread.ResetAbort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user