STPStartInfo stp = new STPStartInfo();
  stp.DisposeOfStateObjects = true;
  stp.CallToPostExecute = CallToPostExecute.Never;
  stp.ThreadPriority = ThreadPriority.Highest;
  stp.UseCallerCallContext = true;
  stp.MaxWorkerThreads = 4;
 
  //职能线程池
  var smartThreadPool = new SmartThreadPool();
  // 执行任务
  smartThreadPool.QueueWorkItem(() =>
  {
    //加载需要处理的数据
    log.InfoFormat("@-->Excete 数据条数{0}", asyncCalls.Count);
    if (asyncCalls != null && asyncCalls.Count > 0)
    {
      foreach (var item in asyncCalls)
      {
        ExecuteService.ExecuteItem(item);
      }
    }
  });
 
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-08-09
  • 2021-11-25
  • 2021-08-16
猜你喜欢
  • 2021-09-13
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案