/// <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);
        }
Beispiel #2
0
        /// <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);
        }