08-03-2006 08:13 AM
08-03-2006 09:40 AM
08-03-2006 09:52 AM
Yes check out the producer consumer model. The producer is your Data Acquisition and the consumer is the data processor. If you use the queue status as the consumers loop termination condition you dont even need a local variable. This is very nice because it ensures that the data acquisition is not lost but buffered in the queue for processing. The processor thread is only going to consume CPU resources when unprocessed data is waiting so you dont have to balance the timing of the two loops. If however the time to acquire is greater than the time to process you can get away with one loop and not worry about lost data.
Paul
08-03-2006 10:02 AM