[pypy-dev] multiple isolated VMs in a single process

Tobias Oberstein Tobias.Oberstein at gmx.de
Fri Feb 7 19:09:48 CET 2003

Are there any design plans regarding threading architecture yet?
I particular, are you planning to support having multiple
interpreters in one process _without_ sharing objects (no free
threading but VM-wise locking). Supporting this would require
early design decisions like

 - no global data for the interpreter/VM
 - no global data in object implementations
 - but what about extension modules? many have global data ..

isn't it? Also, in an  C embedding API, will the VM-state be
take from thread-local storage or passed into every function
by the embedding application via an opaque pointer?

I'm thinking of embedding a dynamic language into an
multithreaded OODBMS. The different VMs within the server process
would share data via objects instantiated from a special
extension class that wraps up the OODBMS. Synchronisation on
these objects is taken care of by the OODBMS. No need to share
objects local to each VM.

Sadly, as I was told, fixing above issues for CPython would
be hard like shit. It's so sad that global data has not been
avoided from the very beginning in the CPython.


More information about the Pypy-dev mailing list