mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
add a bit more pre exit cleanup
This commit is contained in:
@@ -108,16 +108,16 @@ namespace OpenSim.Framework.Servers
|
||||
|
||||
protected override void ShutdownSpecific()
|
||||
{
|
||||
|
||||
|
||||
Watchdog.Enabled = false;
|
||||
base.ShutdownSpecific();
|
||||
|
||||
|
||||
MainServer.Stop();
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
Util.StopThreadPool();
|
||||
WorkManager.Stop();
|
||||
|
||||
Thread.Sleep(1000);
|
||||
RemovePIDFile();
|
||||
m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting...");
|
||||
|
||||
|
||||
@@ -2852,6 +2852,16 @@ namespace OpenSim.Framework
|
||||
return stpi;
|
||||
}
|
||||
|
||||
public static void StopThreadPool()
|
||||
{
|
||||
if (m_ThreadPool == null)
|
||||
return;
|
||||
SmartThreadPool pool = m_ThreadPool;
|
||||
m_ThreadPool = null;
|
||||
|
||||
try { pool.Shutdown(); } catch {}
|
||||
}
|
||||
|
||||
#endregion FireAndForget Threading Pattern
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user