There is a single consumer and single producer thread. The producer thread data acquisition is slow. It queries a socket for data and the time it takes to produce data for the consumer is significantly longer than the time it takes for the consumer to process and send the data out. The problem is I am updating a display so I want the updates to slow down so they appear continuous rather than update in bursts.
I am using a double buffer right now but the consumer is waiting too long for the buffers to be swapped because the producer is taking too long to produce data. Perhaps if I slice up the data into smaller blocks and use a queue instead? That way the producer would feed the consumer a little at a time? Has anyone ever run into this problem?