Beispiel #1
0
 /// <summary>
 /// 添加一个异步队列工作单元,该工作单元的内容在其他线程执行
 /// </summary>
 /// <param name="result">异步调用接口</param>
 /// <param name="callback">异步队列回调接口</param>
 /// <param name="content">异步队列回调接口参数</param>
 public void AddJob(IAsyncResult result, InvokeFinish callback, object content)
 {
     lock (this)
     {
         _jobList.Add(new Job(result, callback, content));
     }
 }
Beispiel #2
0
 public Job(IAsyncResult result, InvokeFinish callback, object content)
 {
     _result   = result;
     _callback = callback;
     _content  = content;
 }