static void Main(string[] args) { QueueToProduceAndSort cqueue = new QueueToProduceAndSort(NbElement); Producteur producteur = new Producteur(cqueue); Consommateur consommateur = new Consommateur(cqueue); producteur.Run(); consommateur.Run(); while (!(cqueue.IsFinished && cqueue.IsEmpty)) { Thread.Sleep(1000); } }
public Producteur(QueueToProduceAndSort cqueue) { queue = cqueue; }
public Consommateur(QueueToProduceAndSort cqueue) { queue = cqueue; }