Hey,
I have a very simple question which seems to be complicated to solve. Google didn't help me, so here is my problem:
I have a camera thread which is constantly emitting a signal with the current picture at 29Hz.
Also, I have a worker within a worker thread which should receive the picture and process it somehow.
My current implementation of the worker can process frames at ~5-10Hz. Since I don't care about every single frame I want the worker to process always the most recent frame.
I also want the threads to be completely independent, so I can't use Qt:irectConnection (which is thread-wise stupid anyways) and I don't want the worker to poll a picture once it is done processing.
Is there any way to limit the queue size to contain only one element which is the most recent one?
Thank you in advance!
Bookmarks