aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Util.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index b96367a..10f38ab 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1347,7 +1347,7 @@ namespace OpenSim.Framework
1347 case FireAndForgetMethod.SmartThreadPool: 1347 case FireAndForgetMethod.SmartThreadPool:
1348 if (m_ThreadPool == null) 1348 if (m_ThreadPool == null)
1349 m_ThreadPool = new SmartThreadPool(2000, 15, 2); 1349 m_ThreadPool = new SmartThreadPool(2000, 15, 2);
1350 m_ThreadPool.QueueWorkItem(delegate(object o) { callback(o); return null; }, obj); 1350 m_ThreadPool.QueueWorkItem(SmartThreadPoolCallback, new object[] { callback, obj });
1351 break; 1351 break;
1352 case FireAndForgetMethod.Thread: 1352 case FireAndForgetMethod.Thread:
1353 Thread thread = new Thread(delegate(object o) { callback(o); }); 1353 Thread thread = new Thread(delegate(object o) { callback(o); });
@@ -1358,6 +1358,16 @@ namespace OpenSim.Framework
1358 } 1358 }
1359 } 1359 }
1360 1360
1361 private static object SmartThreadPoolCallback(object o)
1362 {
1363 object[] array = (object[])o;
1364 WaitCallback callback = (WaitCallback)array[0];
1365 object obj = array[1];
1366
1367 callback(obj);
1368 return null;
1369 }
1370
1361 #endregion FireAndForget Threading Pattern 1371 #endregion FireAndForget Threading Pattern
1362 } 1372 }
1363} 1373}