aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 3203fc1..d5ae3b7 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1273,7 +1273,7 @@ namespace OpenSim.Framework
1273 /// <summary> 1273 /// <summary>
1274 /// Created to work around a limitation in Mono with nested delegates 1274 /// Created to work around a limitation in Mono with nested delegates
1275 /// </summary> 1275 /// </summary>
1276 private class FireAndForgetWrapper 1276 /*private class FireAndForgetWrapper
1277 { 1277 {
1278 public void FireAndForget(System.Threading.WaitCallback callback) 1278 public void FireAndForget(System.Threading.WaitCallback callback)
1279 { 1279 {
@@ -1284,21 +1284,23 @@ namespace OpenSim.Framework
1284 { 1284 {
1285 callback.BeginInvoke(obj, EndFireAndForget, callback); 1285 callback.BeginInvoke(obj, EndFireAndForget, callback);
1286 } 1286 }
1287 } 1287 }*/
1288 1288
1289 public static void FireAndForget(System.Threading.WaitCallback callback) 1289 public static void FireAndForget(System.Threading.WaitCallback callback)
1290 { 1290 {
1291 FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>(); 1291 //FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>();
1292 wrapper.FireAndForget(callback); 1292 //wrapper.FireAndForget(callback);
1293 System.Threading.ThreadPool.UnsafeQueueUserWorkItem(callback, null);
1293 } 1294 }
1294 1295
1295 public static void FireAndForget(System.Threading.WaitCallback callback, object obj) 1296 public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
1296 { 1297 {
1297 FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>(); 1298 //FireAndForgetWrapper wrapper = Singleton.GetInstance<FireAndForgetWrapper>();
1298 wrapper.FireAndForget(callback, obj); 1299 //wrapper.FireAndForget(callback, obj);
1300 System.Threading.ThreadPool.UnsafeQueueUserWorkItem(callback, obj);
1299 } 1301 }
1300 1302
1301 private static void EndFireAndForget(IAsyncResult ar) 1303 /*private static void EndFireAndForget(IAsyncResult ar)
1302 { 1304 {
1303 System.Threading.WaitCallback callback = (System.Threading.WaitCallback)ar.AsyncState; 1305 System.Threading.WaitCallback callback = (System.Threading.WaitCallback)ar.AsyncState;
1304 1306
@@ -1306,7 +1308,7 @@ namespace OpenSim.Framework
1306 catch (Exception ex) { m_log.Error("[UTIL]: Asynchronous method threw an exception: " + ex.Message, ex); } 1308 catch (Exception ex) { m_log.Error("[UTIL]: Asynchronous method threw an exception: " + ex.Message, ex); }
1307 1309
1308 ar.AsyncWaitHandle.Close(); 1310 ar.AsyncWaitHandle.Close();
1309 } 1311 }*/
1310 1312
1311 #endregion FireAndForget Threading Pattern 1313 #endregion FireAndForget Threading Pattern
1312 } 1314 }