static private void ProcessTaskQueue(ITaskQueue queue) { int i = 0; foreach (TaskDelegate task in tasks) { Console.WriteLine("Task " + Convert.ToString(i++) + " enqueued."); queue.EnqueueTask(task); } queue.WaitAll(); }