Win32 的单读取器单写入器队列
你好,
我正在寻找 Win32 的单读单写队列。
最好的问候,弗里德里希
Hallo,
I am looking for a Single-Reader-Single-Writer queue for Win32.
Best regards, Friedrich
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Waitfree 基于单生产者/单消费者链表的队列:
http://www.1024cores.net/home/lock -free-algorithms/queues/unbounded-spsc-queue
Waitfree single-producer/single-consumer linked-list-based queue:
http://www.1024cores.net/home/lock-free-algorithms/queues/unbounded-spsc-queue
这是我的解决方案,基于 http://www.drdobbs.com/cpp/210604448文章。但我不确定它是否真的是线程安全的。好吧,这不是一个重新查看网站,但如果有什么问题请告诉我。每个人都可以自由使用这段代码,malloc 部分应该与无锁内存池分配器交换。
Here is my solution, based on the http://www.drdobbs.com/cpp/210604448 article. But I am not sure if it is really thread-safe. Well, this is not a re-view site, but if there is something wrong please tell me. Everybody is free to use this code, the malloc part should be exchanged with a lock-free memory-pool allocator.