public ClosureWorkItem(Action closure) { continuation = closure; #if TRACK_DETAILED_STATS if (StatisticsCollector.CollectGlobalShedulerStats) { SchedulerStatisticsGroup.OnClosureWorkItemsCreated(); } #endif }
public AsyncClosureWorkItem(Func <Task> closure, string name = null) { this.continuation = closure; this.name = name; #if TRACK_DETAILED_STATS if (StatisticsCollector.CollectGlobalShedulerStats) { SchedulerStatisticsGroup.OnClosureWorkItemsCreated(); } #endif }