public void StartExecute() { // Start the 1st domino!!! if (executing == true) return; JobList targetl = new JobList(); // TODO: Exclusive control is necessary. this.executing = true; Job job; while (this.jobl.Count > 0) { while (true) { if (this.jobl.Count <= 0) break; job = this.jobl[0]; if (job.Action != ActionType.Added && job.Action != ActionType.Changed && job.Action != ActionType.Removed && targetl.Count > 0) { break; } this.jobl.RemoveAt(0); targetl.Add(job); } this.Execute(targetl); targetl.Clear(); } // TODO: Exclusive control is necessary. this.executing = false; }