From 416244051d248236cec142d3bda29d03f39f5606 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 1 Jan 2013 23:50:38 +0000 Subject: refactor: call Util.InitThreadPool() if we are initializing an uninitialized pool on first use rather than constructing it ourselves. No functional change. --- OpenSim/Framework/Util.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/Util.cs') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index ea2d28a..9bc9417 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1719,7 +1719,7 @@ namespace OpenSim.Framework break; case FireAndForgetMethod.SmartThreadPool: if (m_ThreadPool == null) - m_ThreadPool = new SmartThreadPool(2000, 15, 2); + InitThreadPool(15); m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { realCallback, obj }); break; case FireAndForgetMethod.Thread: -- cgit v1.1 From bc9a7ba0d6c0f7ad90a270c93acbb9b5c5f08645 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 1 Jan 2013 23:57:20 +0000 Subject: minor: Assign names to the different SmartThreadPools for debugging purposes. A different approach to the patch in http://opensimulator.org/mantis/view.php?id=6462 that doesn't involve further forking of SmartThreadPool --- OpenSim/Framework/Util.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Framework/Util.cs') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 9bc9417..4fd8a2d 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -1647,6 +1647,7 @@ namespace OpenSim.Framework throw new InvalidOperationException("SmartThreadPool is already initialized"); m_ThreadPool = new SmartThreadPool(2000, maxThreads, 2); + m_ThreadPool.Name = "Util"; } public static int FireAndForgetCount() -- cgit v1.1