使用 线程 和 pxsem 实现多个生产者和一个消费者
摘要:《Unix 进程间通信》中一个使用信号量实现多个生产者和一个消费者的例子,相比使用线程锁和条件更为简单,源码如下:unpv22e\pxsem\prodcons3.c 1 #include 2 #include 3 #include // no name semaphore 4 #...
阅读全文
posted @ 2015-12-25 11:01
posted @ 2015-12-25 11:01
posted @ 2015-12-02 18:13
posted @ 2015-10-28 17:04