Undo "Revert "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.""

Fix for break in next commit

This reverts commit 376fab1402.
This commit is contained in:
BlueWall
2014-09-17 20:03:54 -04:00
parent 1f40630a9a
commit 96a2449122
5 changed files with 14 additions and 11 deletions

View File

@@ -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.