2.6, 3.0, and truly independent intepreters

sturlamolden sturlamolden at yahoo.no
Fri Oct 24 10:32:46 EDT 2008


On Oct 24, 3:58 pm, "Andy O'Meara" <and... at gmail.com> wrote:

> This is discussed earlier in the thread--they're unfortunately all
> out.

It occurs to me that tcl is doing what you want. Have you ever thought
of not using Python?

That aside, the fundamental problem is what I perceive a fundamental
design flaw in Python's C API. In Java JNI, each function takes a
JNIEnv* pointer as their first argument. There  is nothing the
prevents you from embedding several JVMs in a process. Python can
create embedded subinterpreters, but it works differently. It swaps
subinterpreters like a finite state machine: only one is concurrently
active, and the GIL is shared. The approach is fine, except it kills
free threading of subinterpreters. The argument seems to be that
Apache's mod_python somehow depends on it (for reasons I don't
understand).








More information about the Python-list mailing list