Treads command lists threads, but not thread name (yet)

ThreadPoolClientBranch
Tedd Hansen 2008-02-20 21:09:23 +00:00
parent 7d7ad4dff2
commit 5f7a02fce9
1 changed files with 9 additions and 7 deletions

View File

@ -754,15 +754,17 @@ namespace OpenSim
break; break;
case "threads": case "threads":
if (cmdparams.Length > 0) m_console.Notice("THREAD", Process.GetCurrentProcess().Threads.Count + " threads running:");
{ int _tc = 0;
int c = 0;
foreach (Thread t in Process.GetCurrentProcess().Threads) foreach (ProcessThread pt in Process.GetCurrentProcess().Threads)
{ {
c++; _tc++;
m_console.Notice("THREAD", "Thread " + c + ": " + t.Name + " (" + t.ToString() + ")"); m_console.Notice("THREAD", _tc + ": ID: " + pt.Id + ", Started: " + pt.StartTime.ToString() + ", CPU time: " + pt.TotalProcessorTime + ", Pri: " + pt.BasePriority.ToString() + ", State: " + pt.ThreadState.ToString());
} }
}
break; break;
case "save-xml": case "save-xml":
if (cmdparams.Length > 0) if (cmdparams.Length > 0)