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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user