在 c++ 中的两个进程之间拥有无限对象队列的最佳方法

发布于 2025-01-01 14:11:52 字数 101 浏览 1 评论 0原文

我有两个进程,因此进程一生成一些容器对象并将其发送到进程二。 在两个进程之间建立对象队列的最佳方法是什么。我更喜欢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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最单纯的乌龟 2025-01-08 14:11:52

例如,您可以使用共享内存、管道或套接字或 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文