Thanks. I looked at the servlet code.

The PySystemState cannot be shared by multiple PythonInterpreter objects.

What if I have multiple PythonInterpreters executing some code in different threads? Can I share the PySystemState between them?

On Wed, Oct 10, 2012 at 2:00 PM, Jarosław Szczepankiewicz <> wrote:
> 5. From what I know, jython is not multi-threaded, nor is threadsafe. The
> class "org.python.core.PySystemState" cannot be shared between multiple
> instances.

This is probably not 100% correct please see usage PySystemState and
python interpeter in Modjyservlet:!/com/xhaus/modjy/

Servlet is by design not thread safe so they will be using some
synchronisation if the PySystemState was not thread safe.

Santosh Tiwari