Embedding: many interpreters OR one interpreter with many thread states ?

grahamd at dscpl.com.au grahamd at dscpl.com.au
Fri Jun 10 05:18:05 CEST 2005

Greg Ewing wrote:
> adsheehan at eircom.net wrote:
> > - creating many sub-interpreters (Py_NewInterpreter) with a thread
> > state each
> >
> > Or
> >
> > - creating one interpreter with many thread states (PyThreadState_New)
> My understanding is that using multiple interpeters isn't
> really supported properly, despite there being apparent
> support in the API. So I suggest using a single interpeter
> with multiple threads.

Huh. Mod_python uses multiple interpreters and within each
interpreter could be running multiple threads at one time
corresponding to different incoming HTTP requests.

It hasn't helped though that a bug was introduced in Python
2.3.5/4.0 which has been causing grief for some users creating
additional threads from within Python code itself. :-(


More information about the Python-list mailing list