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); } }
public PlanState(PlanConfig config) { _config = config; }