public Consumer() { Console.WriteLine("new consumer added!"); Thread consumer = new Thread(consUse); ThreadLists.Add(consumer); consumer.Start(); }
public Producer() { res = new Resource(); resourcesArr.Add(res); Thread producer = new Thread(proIncrease); ThreadLists.Add(producer); producer.Start(); }