How can I synchronize three threads?

后端 未结 6 1896
北恋
北恋 2021-01-16 10:44

My app consist of the main-process and two threads, all running concurrently and making use of three fifo-queues:

The fifo-q\'s are Qmain, Q1 and Q2. Internally the

6条回答
  •  渐次进展
    2021-01-16 11:08

    1 problem may occur due to this rule "The main-process must continue running all the time, must not be blocked on a 'read'". How did you implement it? what is the difference between 'get' and 'read'?

    Problem seems to be in your implementation, not in the logic. And as you stated, you should not be in any dead lock because you are not acquiring another lock whether in a lock.

提交回复
热议问题