diff options
author | UbitUmarov | 2017-05-24 22:17:04 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-24 22:17:04 +0100 |
commit | dca3a45803a18103113b9eb861da4f79572de924 (patch) | |
tree | 71b2dad54f62c9e0ff5e0df5383c2d7be5121520 /OpenSim/Framework | |
parent | mantis 8780 replace ode bins for linux with ones compiled against older Glibc... (diff) | |
download | opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.zip opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.gz opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.bz2 opensim-SC_OLD-dca3a45803a18103113b9eb861da4f79572de924.tar.xz |
add a bit more pre exit cleanup
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> |