I have a windows application with 3 threads. Each thread is required to continuously capture images from separate cameras, then 2 of the threads will go on to perform image processing, whilst no image processing is required from the 3rd. All images need to be captured at the same time, which is why I have 3 threads.
I have a problem where I am unsure of the best way to synchronize these threads to ensure they capture at the same time. Ideally I would like each thread to wait until all threads have completed processing until capturing the next round of images. I could use shared variables to indicate when each thread is complete, but would like to use a thread synchronization method (like mutex) if there is one suitable.