public void CalculateRandomNumberInBackground() { // execute a one-time background operation and call a completion on the main thread // completion is optional and could be null if desired EZThread.ExecuteInBackground(CalculateRandomNumberInBackgroundThread, CalculateRandomNumberInBackgroundCompletionOnMainThread); // ExecuteInBackground can be called with a single void function if you don't care about completion or the return result, i.e. // EZThread.ExecuteInBackground(() => DoBackgroundStuff()); }
public void CalculateRandomNumberInBackground() { // execute a one-time background operation and call a completion on the main thread //执行一次后台操作,在主线程调用完成 // completion is optional and could be null if desired //可选,如果需要为空的情况 EZThread.ExecuteInBackground(CalculateRandomNumberInBackgroundThread, CalculateRandomNumberInBackgroundCompletionOnMainThread); // ExecuteInBackground can be called with a single void function if you don't care about completion or the return result, i.e. //这可以被称为一个void函数如果你不关心完成或返回的结果 // EZThread.ExecuteInBackground(() => DoBackgroundStuff()); }