public MultipleTasks() { mainProcess = new ProducerConsumer <string>(); mainProcess.ExecuteEvent += MainProcess_ExecuteEvent1; mainProcess.Start(); clients = new Client[qtyClients]; for (int i = 0; i < qtyClients; i++) { clients[i] = new Client(); clients[i].name = "client" + i; } }
public Client() { clientProcess = new ProducerConsumer <string>(); clientProcess.ExecuteEvent += ProducerConsumer_ExecuteEvent; clientProcess.Start(); }