Quote:
Originally Posted by rosna
How to communicate between two threads using message queue?Please give an example code for that.
|
LQ is not a software factory; thus providing code is not what we do.
Therefore, what have you done thus far for your project? Have you at least set up the two threads? If you are using C or C++, then look into using pthread_create() for setting up the threads, and mq_open(), mq_send(), etc. for the message queues.
Note that message queues are suitable for inter-process communications, but for a multi-threaded application, I would suggest that you consider some other alternative (say a "queue").