pthread 同步阻塞队列 [英] pthread synchronized blocking queue

查看:35
本文介绍了pthread 同步阻塞队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找使用 pthread 同步语义的 C 中线程安全阻塞队列(多生产者/消费者)的推荐实现.

I'm looking for a recommended implementation of a thread-safe blocking queue (multi producer/consumer) in C using pthread synchronization semantics.

推荐答案

试试 APR 队列.它被 apache web 服务器使用并且经过很好的测试.

Try APR queues. It's used by the apache web server and pretty well tested.

http://apr.apache.org/docs/apr-util/1.3/apr__queue_8h.html

这篇关于pthread 同步阻塞队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆