/// <summary> /// 线程池调用 /// </summary> /// <param name="o"></param> private void AsyncExecute(object o) { IAsyncTask asyncTask = o as IAsyncTask; AsyncState newState = asyncTask.DoAsyncTask(); AsyncTaskMessage message = new AsyncTaskMessage(); message.State = newState; message.AsyncTask = asyncTask; SystemMessageQueue.Instance.Offer(message); }
/// <summary> /// 线程池调用 /// </summary> /// <param name="o"></param> private void AsyncExecute(object o) { IAsyncTask asyncTask = o as IAsyncTask; AsyncState newState = asyncTask.DoAsyncTask(); AsyncTaskMessage message = new AsyncTaskMessage(); message.State = newState; message.AsyncTask = asyncTask; SystemMessageQueue.Instance.Offer(message); }