生产者-消费者问题是经典的进程同步互斥问题.本文详尽阐述了Linux下利用互斥锁、条件变量、线程管理等相关函数实现多线程生产者-消费者问题,以提高资源利用率.%Producer -consumer problem is a classic process synchronization and exclusion problem. This paper elaborates the implementation of multi—threaded producer—consumer problem under Linux by using mutexes, condition variables, thread management and other functions, in order to improve resource utilization.
展开▼