aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index bbb0ae2..58344f3 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1169,5 +1169,27 @@ namespace OpenSim.Framework
1169 1169
1170 return found.ToArray(); 1170 return found.ToArray();
1171 } 1171 }
1172
1173 #region FireAndForget Threading Pattern
1174
1175 public static void FireAndForget(System.Threading.WaitCallback callback)
1176 {
1177 callback.BeginInvoke(null, EndFireAndForget, callback);
1178 }
1179
1180 public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
1181 {
1182 callback.BeginInvoke(obj, EndFireAndForget, callback);
1183 }
1184
1185 private static void EndFireAndForget(IAsyncResult ar)
1186 {
1187 System.Threading.WaitCallback callback = (System.Threading.WaitCallback)ar.AsyncState;
1188
1189 callback.EndInvoke(ar);
1190 ar.AsyncWaitHandle.Close();
1191 }
1192
1193 #endregion FireAndForget Threading Pattern
1172 } 1194 }
1173} 1195}