public void ProcessJobs() { while (true) { while (JobList.Count != 0) { IJob jobToProcess = JobList.Dequeue(); jobToProcess.Start(); JobListFinished.Enqueue(jobToProcess); } waitForSomethingTodo.WaitOne(); } }
public void ProcessJobs() { while (true) { while (JobList.Count != 0) { IJob jobToProcess = JobList.Dequeue(); jobToProcess.Start(); JobListFinished.Enqueue(jobToProcess); } waitForSomethingTodo.WaitOne(); } }