在 c++ 中的两个进程之间拥有无限对象队列的最佳方法
我有两个进程,因此进程一生成一些容器对象并将其发送到进程二。 在两个进程之间建立对象队列的最佳方法是什么。我更喜欢boost库, 但据我所知,对于共享内存,我们不能拥有无限的共享内存空间。
i have two processes so process one generate some container object and send it to process two.
what is best way to have object queue between two process .i prefer boost library,
but as i know with shared memory we cant have unlimited memory space in share.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例如,您可以使用共享内存、管道或套接字或 TCP 作为进程之间正常大小的队列。如果您确实需要汇集大量数据,那么您可能还需要考虑使用文件,仅通过队列发送文件名等。
尽管如此,总是存在某种限制。
You can use, e.g., shared memory, pipes or sockets or TCP for normal sized queues between processes. If you really need to funnel huge amount of data then you might want to also consider using files, sending only, e.g., file names through your queue.
Nevertheless, there is always some kind of a limit there.