Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 public static void QueueUserWorkItem(WaitCallback callback, object state)
 {
     if (Pool != null)
     {
         QueueWorkItemFunc2.Invoke(Pool, new[] { Delegate.CreateDelegate(WorkItemCallbackType, callback, Invoker.Method), state });
     }
     else
     {
         ThreadPool.QueueUserWorkItem(callback.Invoke, state);
     }
 }