I have a single producer that produce something. I have n consumers (in n threads). The producer knows the number of consumers. The producer must produce 1 unit of data, make the n consumers start and wait the n consumers to end. Then it must produce another unit of data...
How should I do it? I'm trying with ManualResetEven  t and AutoResetEvent but I have some race conditions... For example I tried something like:
public class...