Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
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);
     }
 }