From af286d5fcb688e8b64202b6deca4f249e9a2b6b8 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 17 Sep 2014 17:56:10 -0400 Subject: Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects. --- ThirdParty/SmartThreadPool/SmartThreadPool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ThirdParty') diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.cs index a4f4ce5..615518e 100644 --- a/ThirdParty/SmartThreadPool/SmartThreadPool.cs +++ b/ThirdParty/SmartThreadPool/SmartThreadPool.cs @@ -677,7 +677,6 @@ namespace Amib.Threading : new Thread(ProcessQueuedItems); #endif // Configure the new thread and start it - workerThread.Name = "STP " + Name + " Thread #" + _threadCounter; workerThread.IsBackground = _stpStartInfo.AreThreadsBackground; #if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE) @@ -691,6 +690,7 @@ namespace Amib.Threading workerThread.Priority = _stpStartInfo.ThreadPriority; #endif workerThread.Start(); + workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter); ++_threadCounter; // Add it to the dictionary and update its creation time. -- cgit v1.1