More than one interpreter per process?

sturlamolden sturlamolden at yahoo.no
Tue Dec 18 09:55:16 EST 2007


On 18 Des, 05:46, Michael L Torrie <torr... at chem.byu.edu> wrote:

> How would this handle python resources that a programmer would want to
> share among the threads?  What facilities for IPC between the
> interpreters would be used?

There would be no IPC as they would live in the same process. A thread-
safe queue would suffice. Python objects would have to be serialized
before placed in the queue. One could also allow NumPy-like arrays in
two separate interpreters to share the same memory buffer.

With an emulated fork() the whole interpreter would be cloned,
possibly deferred in a 'copy on write' scheme.

Multiple processes and IPC is what we have today with e.g. mpi4py.









More information about the Python-list mailing list