示例#1
0
 private static void DoNotify(PlanConfig planConfig)
 {
     if (planConfig != null && planConfig.Callback != null)
     {
         ThreadPool.QueueUserWorkItem(obj =>
         {
             Interlocked.Increment(ref planConfig._isExcuting);
             try
             {
                 planConfig.Callback((PlanConfig)obj);
             }
             catch (Exception ex)
             {
                 TraceLog.WriteError("TimeListener notify error:{0}", ex);
             }
             finally
             {
                 Interlocked.Decrement(ref planConfig._isExcuting);
             }
         }, planConfig);
     }
 }
示例#2
0
 public PlanState(PlanConfig config)
 {
     _config = config;
 }