The data type with which the concurrent queue is initialised is a struct of multiple datatypes. The dequeue is in a separate function running in a separate thread. when the function is called through the thread and the reference is passed through std::ref, it is giving error.
sample code:
`
struct frame_data{
Mat frame;
int frame_num;
};
I just passed by simple address reference(&) instead of using std::ref, it is working good. I was converting the code to replace zmq with the concurrent queues, was without thinking used the same syntax.
The data type with which the concurrent queue is initialised is a struct of multiple datatypes. The dequeue is in a separate function running in a separate thread. when the function is called through the thread and the reference is passed through std::ref, it is giving error.
sample code: ` struct frame_data{ Mat frame; int frame_num; };
void mask (moodycamel::BlockingConcurrentQueue<frame_data*>& capture){ frame_data item; capture->wait_dequeue(item); }
main(){ moodycamel::BlockingConcurrentQueue capture;
std::thread(mask, std::ref(capture)).detach(); }`