Merge branch 'moses.metricsPhase2' of git.irl.ucf.edu:/irl/git/opensim into moses.metricsPhase2

This commit is contained in:
Glenn Martin
2015-05-18 16:36:06 -04:00

View File

@@ -433,7 +433,11 @@ Asset service request failures: {3}" + Environment.NewLine,
foreach (ProcessThread currentThread in
Process.GetCurrentProcess().Threads)
{
if (currentThread.ThreadState == ThreadState.Running)
// A known issue with the current process .Threads property is
// that it can return null threads, thus don't count those as
// running threads and prevent the program function from failing
if (currentThread != null &&
currentThread.ThreadState == ThreadState.Running)
{
numberThreadsRunning++;
}