public static void ExecuteAsync(this IAsyncRunner runner, AsyncRunType runType, WaitCallback callback, ExceptionCallback exceptionCallback) { if (runType == AsyncRunType.ThreadPool) { ThreadPool.QueueUserWorkItem(delegate { ExecuteAsyncInternal(callback, exceptionCallback); }); } else { Thread newThread = new Thread(new ParameterizedThreadStart(ExecuteAsyncStart)); newThread.Start(new ExecuteAsyncThreadStartParameter { RunCallback = callback, ExceptionCallback = exceptionCallback }); } }
public static void ExecuteAsync(this IAsyncRunner runner, AsyncRunType runType, WaitCallback callback, ExceptionCallback exceptionCallback) { if (runType == AsyncRunType.ThreadPool) { ThreadPool.QueueUserWorkItem(delegate { ExecuteAsyncInternal(callback, exceptionCallback); }); } else { Thread newThread = new Thread(new ParameterizedThreadStart(ExecuteAsyncStart)); newThread.Start(new ExecuteAsyncThreadStartParameter { RunCallback = callback, ExceptionCallback = exceptionCallback }); } }
public static void ExecuteAsync(this IAsyncRunner runner, AsyncRunType runType, WaitCallback callback) { ExecuteAsync(runner, runType, callback, null); }
public static void ExecuteAsync(this IAsyncRunner runner, AsyncRunType runType, WaitCallback callback) { ExecuteAsync(runner, runType, callback, null); }