08-11-2011 10:20 AM
Yes that is definately something to consider. If the queue is full the next enqueue will just wait forever or until the queue is destroyed. Without knowing more about what Thomasocholt is trying to do there are a lot of questions. Maybe it is not possible that the queues will ever have different numbers of items. Maybe it is only necessary to compare items in the order they were sent or maybe the time they were sent is important. I would keep it simple like you suggested and use just one queue. The datatype can be a cluster with an item identifying the blower. If it is necessary to compare data in two queues it leads me to think that it is one process or function.
08-11-2011 10:39 AM - edited 08-11-2011 10:39 AM
Thank you Norbert. This works. In my machine, a part undergoes first one measurement (Queue 1), then a second one (Queue 2). Once I have both measurements, I compare them (Consumer) to decide if the part is good or bad. Now, with your solution, even if I run several parts very quickly and the Queue builds up several elements, it still processes the data correctly pairwise until the queues are empty again.