public StatisticsTracker(ThreadPoolTrackingStatistic statistic, TimeSpan delayWarningThreshold, ILogger log, SchedulerStatisticsGroup schedulerStatistics) { this.statistic = statistic; this.delayWarningThreshold = delayWarningThreshold; this.log = log; this.schedulerStatistics = schedulerStatistics; }
public ThreadPoolExecutor( ThreadPoolExecutorOptions options, SchedulerStatisticsGroup schedulerStatistics, StageAnalysisStatisticsGroup schedulerStageStatistics, IOptions <StatisticsOptions> statisticsOptions) { this.options = options ?? throw new ArgumentNullException(nameof(options)); this.schedulerStatistics = schedulerStatistics; this.schedulerStageStatistics = schedulerStageStatistics; this.statisticsOptions = statisticsOptions; workQueue = new ThreadPoolWorkQueue(); statistic = new ThreadPoolTrackingStatistic(options.Name, options.LoggerFactory, statisticsOptions, schedulerStageStatistics); executingWorkTracker = new ExecutingWorkItemsTracker(this); log = options.LoggerFactory.CreateLogger <ThreadPoolExecutor>(); options.CancellationTokenSource.Token.Register(Complete); for (var threadIndex = 0; threadIndex < options.DegreeOfParallelism; threadIndex++) { RunWorker(threadIndex); } }
public StatisticsTracker(ThreadPoolTrackingStatistic statistic, TimeSpan delayWarningThreshold, ILogger log) { this.statistic = statistic; this.delayWarningThreshold = delayWarningThreshold; this.log = log; }