阅读背景:

如何安排pthread_cond_signal()使其始终跟随另一个线程上的pthread_cond_wait()?

来源:互联网 

I am testing a producer-consumer scenario where the producer blocks when it tries to write on a queue which is full. I want to test that the producer thread wakes up properly and works as per expectation after the consumer reads from the full queue*. The queue write API calls pthread_cond_wait() on detecting queue full and the read API signals the conditional variable after reading from the queue.I am testing a producer-consumer scenario where




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: