Don't try to abort worker threads in WebFetchInvDescModule if module was not enabled.

This also moves the abort to RemoveRegion() rather than a destructor.
cpu-performance
Justin Clark-Casey (justincc) 2013-06-14 23:53:20 +01:00
parent 6b8e94864a
commit d412c1b0eb
1 changed files with 4 additions and 6 deletions

View File

@ -116,6 +116,10 @@ namespace OpenSim.Region.ClientStack.Linden
m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= DeregisterCaps;
foreach (Thread t in m_workerThreads)
Watchdog.AbortThread(t.ManagedThreadId);
m_scene = null;
}
@ -165,12 +169,6 @@ namespace OpenSim.Region.ClientStack.Linden
#endregion
~WebFetchInvDescModule()
{
foreach (Thread t in m_workerThreads)
Watchdog.AbortThread(t.ManagedThreadId);
}
private class PollServiceInventoryEventArgs : PollServiceEventArgs
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);