Multiple, separated interpreters in a single process

Paul Rubin phr-n2003b at NOSPAMnightsong.com
Thu Feb 6 15:29:20 EST 2003


"Tobias Oberstein" <Tobias.Oberstein at gmx.de> writes:
> I cannot go with namespaces or interpreters in different
> processes, because though I don't need to share Python object
> spaces directly (which would obviously require fine-grained
> locking with all it's performance hits), I need to share the
> application context (OODBMS) of the multithreaded application
> that embeds Python. The application context is wrapped up in
> Python extension classes, which take care of the necessary
> synchronisation and locking.

If those extension classes don't themselves call the interpreter,
maybe you can put those objects in a separate process and let your
different interpreters (each in their own process) communicate through
an RPC interface.  That's sort of like a traditional database that
accepts multiple client connections.




More information about the Python-list mailing list