Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 Python 构建一个服务器,并且正在考虑将内存存储在一个单独的进程中,以便可以轻松升级和维护具有业务逻辑的进程。我认为 memcached 可能是我正在寻找的东西,但在我粗略的检查中,它似乎不能很好地存储 python 对象(Twisted 连接对象)。
在 python 进程之间传递 (key:value) 对象的最简单方法是什么?因为这是在 Twisted 中,所以我所追求的是最异步友好的方法。
对此设计的一般反馈也值得赞赏。
从模块中查看Queue和Pipe类。multiprocessing该文档有示例。
Queue
Pipe
multiprocessing