[Python-Dev] Pythonic concurrency
p.f.moore at gmail.com
Fri Sep 30 17:53:32 CEST 2005
On 9/30/05, Jeremy Maxfield <anothermax at gmail.com> wrote:
> Support for multiple interpreters already exists from the C API
> (mod_python, Java Embedded Python a few other add-ons use them)
I'm aware of that (didn't I mention it in my message - sorry).
> - it's not possible to create new interpreter instances from within Python.
> - there's no mechanism for passing information between interpreters.
But one could possibly be added when exposing the functionality to Python.
> - interaction with extension modules instances may be a problem.
This is the issue I have heard mentioned before as the problematic
one. Unfortunately, I don't know enough about the problems to be able
to comment. If it's as simple as saying that any global state
maintained by an extension module is part of the "shared state", then
I'm OK with that (although it would be nice to encourage extension
authors to document their global state a bit more clearly :-))
Actually, it might be necessary to use global extension state (and the
fact that it's shared) to implement inter-interpreter communication...
> Apart from these points they actually seem to work pretty well and it might
> be, as you suggest, a "Practical" approach.
> Implementing a 'subinterp' module could be interesting...
Indeed. Maybe I'll have a go (in my copious free time :-))
More information about the Python-Dev