예제 #1
0
 public static bool QueueUserWorkItem <TState>(System.Action <TState> callBack,
                                               TState state, bool preferLocal)
 {
     java.lang.Runnable.Delegate runnable = () => callBack(state);
     JavaThreadPool.execute(runnable.AsInterface());
     return(true);
 }
예제 #2
0
 public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack,
                                      object state)
 {
     if (callBack == null)
     {
         throw new System.ArgumentNullException();
     }
     java.lang.Runnable.Delegate runnable = () => callBack(state);
     JavaThreadPool.execute(runnable.AsInterface());
     return(true);
 }
예제 #3
0
 public Thread(System.Threading.ThreadStart start)
 {
     java.lang.Runnable.Delegate runnable = () => start();
     JavaThread = new java.lang.Thread(runnable.AsInterface());
     SetThreadId();
 }
예제 #4
0
 public static void UnsafeQueueCustomWorkItem(IThreadPoolWorkItem workItem, bool forceGlobal)
 {
     java.lang.Runnable.Delegate runnable = () => workItem.ExecuteWorkItem();
     JavaThreadPool.execute(runnable.AsInterface());
 }