2.6, 3.0, and truly independent intepreters

greg greg at cosc.canterbury.ac.nz
Sat Oct 25 01:54:04 EDT 2008


Andy O'Meara wrote:

> - each worker thread makes its own interpreter, pops scripts off a
> work queue, and manages exporting (and then importing) result data to
> other parts of the app.

I hope you realize that starting up one of these interpreters
is going to be fairly expensive. It will have to create its
own versions of all the builtin constants and type objects,
and import its own copy of all the modules it uses.

One wonders if it wouldn't be cheaper just to fork the
process. Shared memory can be used to transfer large lumps
of data if needed.

-- 
Greg



More information about the Python-list mailing list