I am trying to use c++ queue. I know queue element can be accessed by existing threads, but I want to use same queue element. It will be used by all threads, e.g: same video frame I want to use between thread1 and thread2.
Once it's processed by two threads I want to pop next video frame. I know threads will access individual elements (queue element 1 by thread1 and queue element2 by thread2), but I want to access queue element 1 by both threads. I am unable to lock single buffer for both threads.
Please help me to share same queue element between threads.