Open Cstardust opened 1 year ago
https://cstardust.github.io/2023/02/22/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F-semaphore%E5%AE%9E%E7%8E%B0/#more
如jyy所说,cond和mutex配合在一起就是万能方案.我也就不咋喜欢用信号量semaphore.但这是个考点啊。遂用cond和mutex实现一下.
https://cstardust.github.io/2023/02/22/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F-semaphore%E5%AE%9E%E7%8E%B0/#more
如jyy所说,cond和mutex配合在一起就是万能方案.我也就不咋喜欢用信号量semaphore.但这是个考点啊。遂用cond和mutex实现一下.