Changing an object while loop

Hi,
I have a program which continously captures images from the webcam and does some processing (in a while loop). While doing this processing a global queue is accessed. I need to manually add values to the queue without interrupting the while loop (like cin>> value to be added to queue). I dont want the processing to stop while I am adding to the queue. Is there any way to do this?
You'll probably have to create a new thread...

Hope that helps
Topic archived. No new replies allowed.