mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Fix "show threads" to show threads now being managed by OpenSim.Framework.Watchdog
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace OpenSim.Framework
|
||||
const int WATCHDOG_TIMEOUT_MS = 5000;
|
||||
|
||||
[System.Diagnostics.DebuggerDisplay("{Thread.Name}")]
|
||||
private class ThreadWatchdogInfo
|
||||
public class ThreadWatchdogInfo
|
||||
{
|
||||
public Thread Thread;
|
||||
public int LastTick;
|
||||
@@ -149,6 +150,15 @@ namespace OpenSim.Framework
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get currently watched threads for diagnostic purposes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ThreadWatchdogInfo[] GetThreads()
|
||||
{
|
||||
return m_threads.Values.ToArray();
|
||||
}
|
||||
|
||||
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user