1 Star 0 Fork 1

苏小逝 / SharedMQ

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-2-Clause

SharedMQ:进程间消息队列

是一个进程间通信组件:基于IO事件、基于共享内存实现的消息队列

特性

  • 支持单消费者进程与单生产者进程
  • 支持多消费者进程与多生产者进程
  • 支持单消费者线程与单生产者线程(但是不如直接用内存数据结构,不推荐使用)
  • 不支持多生产者线程与多消费者线程

性能测试

单生产者进程、单消费者进程

100W data handler, each data length 1000B

test id push pop each delay
1 3480ms 3480ms 0.011ms
2 3598ms 3598ms 0.009ms
3 3276ms 3276ms 0.007ms
4 3602ms 3602ms 0.008ms
5 3684ms 3684ms 0.008ms
6 2556ms 2556ms 0.006ms
7 2878ms 2878ms 0.009ms
8 3611ms 3611ms 0.008ms
9 3642ms 3642ms 0.009ms
10 2990ms 2990ms 0.006ms
Copyright (c) 2016, leechanx All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
BSD-2-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kimbeaur/SharedMQ.git
git@gitee.com:kimbeaur/SharedMQ.git
kimbeaur
SharedMQ
SharedMQ
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891