Search Result

Collapse
2 results in 0.0038 seconds.
Keywords
Members
Tags
synchronization
  •  

  • xanatos
    started a topic Single producer and Multiple consumers

    Single producer and Multiple consumers

    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...
    See more | Go to post

  • How to create a separate thread to process events?

    Here is my problem. I have a thread which constantly polls a piece of hardware's serial output. Every time it detects a certain serial sequence, it triggers an event handler wherein I have code which processes said sequence.

    The problem is that the processing is quite time intensive. I noticed that when the program is in the event handler, the hardware is not being polled. If possible, I would like the processing and polling to happen...
    See more | Go to post
Working...