public static void QueueUserWorkItem(System.Threading.WaitCallback callback, object state) { if (Pool != null) { Pool.QueueWorkItem(sync => { callback.Invoke(sync); return(null); }, state); } else { System.Threading.ThreadPool.QueueUserWorkItem(sync => callback.Invoke(sync), state); } }
public static void QueueUserWorkItem(System.Threading.WaitCallback callback, object state) { if (Pool != null) { QueueWorkItemFunc2.Invoke(Pool, new object[] { Delegate.CreateDelegate(WorkItemCallbackType, callback, Invoker.Method), state }); } else { System.Threading.ThreadPool.QueueUserWorkItem(sync => callback.Invoke(sync), state); } }