diff options
author | Justin Clark-Casey (justincc) | 2014-11-03 23:49:11 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:23:10 +0000 |
commit | 72cb1cc7d6b1dc69e959581817c70e92435d002f (patch) | |
tree | 668ceffc52aacd99512a9fe55a04e1a3e334a5bd /OpenSim/Framework/Util.cs | |
parent | Just for now, don't alert the user or log if we couldn't change their server-... (diff) | |
download | opensim-SC-72cb1cc7d6b1dc69e959581817c70e92435d002f.zip opensim-SC-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.gz opensim-SC-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.bz2 opensim-SC-72cb1cc7d6b1dc69e959581817c70e92435d002f.tar.xz |
Add "show threadpool calls" command to show count of all labelled smartthreadpool calls
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index fefa050..53bbb06 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -2086,14 +2086,28 @@ namespace OpenSim.Framework | |||
2086 | } | 2086 | } |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | public static Dictionary<string, int> GetFireAndForgetCallsMade() | ||
2090 | { | ||
2091 | return new Dictionary<string, int>(m_fireAndForgetCallsMade); | ||
2092 | } | ||
2093 | |||
2094 | private static Dictionary<string, int> m_fireAndForgetCallsMade = new Dictionary<string, int>(); | ||
2089 | 2095 | ||
2090 | public static void FireAndForget(System.Threading.WaitCallback callback, object obj) | 2096 | public static void FireAndForget(System.Threading.WaitCallback callback, object obj) |
2091 | { | 2097 | { |
2092 | FireAndForget(callback, obj, null); | 2098 | FireAndForget(callback, obj, null); |
2093 | } | 2099 | } |
2094 | 2100 | ||
2095 | public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context) | 2101 | public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context) |
2096 | { | 2102 | { |
2103 | if (context != null) | ||
2104 | { | ||
2105 | if (!m_fireAndForgetCallsMade.ContainsKey(context)) | ||
2106 | m_fireAndForgetCallsMade[context] = 1; | ||
2107 | else | ||
2108 | m_fireAndForgetCallsMade[context]++; | ||
2109 | } | ||
2110 | |||
2097 | WaitCallback realCallback; | 2111 | WaitCallback realCallback; |
2098 | 2112 | ||
2099 | bool loggingEnabled = LogThreadPool > 0; | 2113 | bool loggingEnabled = LogThreadPool > 0; |