diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 7d21e00..bc68681 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -108,16 +108,16 @@ namespace OpenSim.Framework.Servers | |||
108 | 108 | ||
109 | protected override void ShutdownSpecific() | 109 | protected override void ShutdownSpecific() |
110 | { | 110 | { |
111 | 111 | Watchdog.Enabled = false; | |
112 | |||
113 | base.ShutdownSpecific(); | 112 | base.ShutdownSpecific(); |
114 | 113 | ||
115 | MainServer.Stop(); | 114 | MainServer.Stop(); |
116 | 115 | ||
117 | Thread.Sleep(5000); | 116 | Thread.Sleep(5000); |
118 | 117 | Util.StopThreadPool(); | |
119 | WorkManager.Stop(); | 118 | WorkManager.Stop(); |
120 | 119 | ||
120 | Thread.Sleep(1000); | ||
121 | RemovePIDFile(); | 121 | RemovePIDFile(); |
122 | m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); | 122 | m_log.Info("[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); |
123 | 123 | ||
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index f6ded04..3342df3 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -2852,6 +2852,16 @@ namespace OpenSim.Framework | |||
2852 | return stpi; | 2852 | return stpi; |
2853 | } | 2853 | } |
2854 | 2854 | ||
2855 | public static void StopThreadPool() | ||
2856 | { | ||
2857 | if (m_ThreadPool == null) | ||
2858 | return; | ||
2859 | SmartThreadPool pool = m_ThreadPool; | ||
2860 | m_ThreadPool = null; | ||
2861 | |||
2862 | try { pool.Shutdown(); } catch {} | ||
2863 | } | ||
2864 | |||
2855 | #endregion FireAndForget Threading Pattern | 2865 | #endregion FireAndForget Threading Pattern |
2856 | 2866 | ||
2857 | /// <summary> | 2867 | /// <summary> |