How to pass data between 2 Threads
My program has 2 threads, a MainThread and a ChildThread. Each thread has its own queue .
Every time the ChildThread receives data, it put in its queue and send that data to MainThread and MainThread keep track that data in its own queue also.
Does anyone know how to pass data between Threads?
// wait to receive data from Child Thread
void * Child_Thread(void)
// wait for data arrive and put in the queue
// send the data to Main Thread to put in its queue
Thank you very much for your help.