[Python-ideas] The future of Python parallelism. The GIL. Subinterpreters. Actors.
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jul 17 18:56:41 EDT 2018
MRAB wrote:
> The shared object's refcount would be incremented and the sharing
> function would return a proxy to the shared object.
>
> Refcounting in the thread/process would be done on the proxy.
>
> When the proxy is closed or garbage-collected, the shared object's
> refcount would be decremented.
What about other objects accessed through the shared object?
They would need to get wrapped in proxies too.
Also, if the shared object is mutable, changes to it would
need to be protected by a lock of some kind.
Maybe all this could be taken care of by the proxy objects,
but it seems like it would be quite tricky to get right.
--
Greg
More information about the Python-ideas
mailing list