擅长:python、mysql、java
<p>如<a href="https://docs.python.org/2/library/multiprocessing.html#multiprocessing-managers" rel="nofollow">the documentation on managers</a>所述:</p>
<blockquote>
<p>Modifications to mutable values or items in dict and list proxies will
not be propagated through the manager, because the proxy has no way of
knowing when its values or items are modified. To modify such an item,
you can re-assign the modified object to the container proxy</p>
</blockquote>
<p>尽管<code>multiprocessing</code>使多个进程之间的通信变得容易,但它仍然不能执行操作系统不允许的操作(访问另一个进程的内存)。实际上,<code>Manager</code>的工作是处理对象的副本,这些副本在需要时被序列化。在</p>
<blockquote>
<p>I understand the way to work around this is to use object ID as a key</p>
</blockquote>
<p>请注意,您将无法在其他进程中获取这些对象实例。
“正确”的方法是在更改对象时重新指定它们。在</p>