diff options
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 557f38e..f520a01 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1852,7 +1852,7 @@ namespace OpenSim.Framework | |||
1852 | case FireAndForgetMethod.SmartThreadPool: | 1852 | case FireAndForgetMethod.SmartThreadPool: |
1853 | if (m_ThreadPool == null) | 1853 | if (m_ThreadPool == null) |
1854 | InitThreadPool(15); | 1854 | InitThreadPool(15); |
1855 | m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { realCallback, obj }); | 1855 | m_ThreadPool.QueueWorkItem((cb, o) => cb(o), realCallback, obj); |
1856 | break; | 1856 | break; |
1857 | case FireAndForgetMethod.Thread: | 1857 | case FireAndForgetMethod.Thread: |
1858 | Thread thread = new Thread(delegate(object o) { realCallback(o); }); | 1858 | Thread thread = new Thread(delegate(object o) { realCallback(o); }); |
@@ -1922,15 +1922,15 @@ namespace OpenSim.Framework | |||
1922 | return sb.ToString(); | 1922 | return sb.ToString(); |
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | private static object SmartThreadPoolCallback(object o) | 1925 | // private static object SmartThreadPoolCallback(object o) |
1926 | { | 1926 | // { |
1927 | object[] array = (object[])o; | 1927 | // object[] array = (object[])o; |
1928 | WaitCallback callback = (WaitCallback)array[0]; | 1928 | // WaitCallback callback = (WaitCallback)array[0]; |
1929 | object obj = array[1]; | 1929 | // object obj = array[1]; |
1930 | 1930 | // | |
1931 | callback(obj); | 1931 | // callback(obj); |
1932 | return null; | 1932 | // return null; |
1933 | } | 1933 | // } |
1934 | 1934 | ||
1935 | #endregion FireAndForget Threading Pattern | 1935 | #endregion FireAndForget Threading Pattern |
1936 | 1936 | ||