More than one interpreter per process?

Christian Heimes lists at cheimes.de
Wed Dec 19 02:02:32 EST 2007


Roger Binns wrote:
> sturlamolden wrote:
>> If one can have more than one interpreter in a single process, 
> 
> You can.  Have a look at mod_python and mod_wsgi which does exactly
> this.  But extension modules that use the simplified GIL api don't work
> with them (well, if at all).

No, you can't. Sub-interpreters share a single GIL and other state. Why
don't you run multiple processes? It's on of the oldest and best working
ways use the full potential of your system. Lot's of Unix servers like
postfix, qmail, apache (with some workers) et al. use processes.

Christian




More information about the Python-list mailing list