aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ThirdParty/SmartThreadPool
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-22 01:30:12 -0700
committerJohn Hurliman2009-10-22 01:30:12 -0700
commit2f394b7e7ebf991c7a70f93bf251d26d8043aaa2 (patch)
tree28e1635d47af4cfe4337d1d68f30090860ca01ca /ThirdParty/SmartThreadPool
parentRemove the "mel_t" from version string (diff)
downloadopensim-SC_OLD-2f394b7e7ebf991c7a70f93bf251d26d8043aaa2.zip
opensim-SC_OLD-2f394b7e7ebf991c7a70f93bf251d26d8043aaa2.tar.gz
opensim-SC_OLD-2f394b7e7ebf991c7a70f93bf251d26d8043aaa2.tar.bz2
opensim-SC_OLD-2f394b7e7ebf991c7a70f93bf251d26d8043aaa2.tar.xz
* Allow SmartThreadPool to be initialized without setting max stack size (like the original implementation)
* Only initialize Util's SmartThreadPool if it is actually being used * No longer initializing Util's SmartThreadPool with a custom max stack size. From MSDN: "Avoid using this constructor overload. The default stack size used by the Thread(ThreadStart) constructor overload is the recommended stack size for threads."
Diffstat (limited to 'ThirdParty/SmartThreadPool')
-rw-r--r--ThirdParty/SmartThreadPool/SmartThreadPool.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.cs
index c21984e..bd52f62 100644
--- a/ThirdParty/SmartThreadPool/SmartThreadPool.cs
+++ b/ThirdParty/SmartThreadPool/SmartThreadPool.cs
@@ -499,7 +499,11 @@ namespace Amib.Threading
499 } 499 }
500 500
501 // Create a new thread 501 // Create a new thread
502 Thread workerThread = new Thread(new ThreadStart(ProcessQueuedItems), _stpStartInfo.StackSize); 502 Thread workerThread;
503 if (_stpStartInfo.StackSize > 0)
504 workerThread = new Thread(ProcessQueuedItems, _stpStartInfo.StackSize);
505 else
506 workerThread = new Thread(ProcessQueuedItems);
503 507
504 // Configure the new thread and start it 508 // Configure the new thread and start it
505 workerThread.Name = "STP " + Name + " Thread #" + _threadCounter; 509 workerThread.Name = "STP " + Name + " Thread #" + _threadCounter;