/// <summary> /// Initializes a new instance of the VerbRunner class. /// </summary> /// <param name="verbToposorter">The verb sorter to use.</param> /// <param name="jobParallelism">Degree of parallelism to allow.</param> public VerbRunner(VerbToposorter verbToposorter, int jobParallelism) { this.verbToposorter = verbToposorter; this.jobParallelism = jobParallelism; this.completionEvent = new ManualResetEvent(true); this.verbStateLock = new ReaderWriterLock(); this.runnableVerbs = new HashSet<IVerb>(); this.startedVerbs = new HashSet<IVerb>(); this.taskCompletionsLock = new ReaderWriterLock(); this.taskCompletions = new List<TaskCompletion>(); this.runningTasks = 0; }
////private DbgVerbCounter dbgVerbCounter = new DbgVerbCounter(); /// <summary> /// Initializes a new instance of the Scheduler class. /// </summary> /// <param name="jobParallelism"> /// Degree of parallel execution to allow. /// </param> /// <param name="rejectCachedFailures"> /// Whether to reject cached failures. /// </param> public Scheduler(int jobParallelism) { this.targets = new HashSet<BuildObject>(); this.waitIndex = new WaitIndex(); this.repository = BuildEngine.theEngine.Repository; this.unrecordableFailures = new Dictionary<IVerb, Disposition>(); this.verbToposorter = new VerbToposorter(); this.verbRunner = new VerbRunner(this.verbToposorter, jobParallelism); this.resolvedVerbs = new HashSet<IVerb>(); this.completedVerbs = new HashSet<IVerb>(); this.outputToVerbMap = new Dictionary<BuildObject, IVerb>(); this.knownVerbs = new HashSet<IVerb>(); this.depCache = new DependencyCache(); this.rejectCachedFailures = true; // this is now permanent. The code path for caching Failure results has rotted. }