[Python-3000] the future of the GIL

Brett Cannon brett at python.org
Tue May 8 19:49:31 CEST 2007

On 5/8/07, Guido van Rossum <guido at python.org> wrote:
> On 5/8/07, Thomas Heller <theller at ctypes.org> wrote:
> > Wouldn't multiple interpreters (assuming the problems with them would be
> fixed)
> > in the same process give the same benefit?  A separate GIL for each one?
> No; numerous read-only and immutable objects (e.g. the small integers,
> 1-character strings, the empty tuple; and all built-in type objects)
> are shared between all interpreters. Also, extensions can easily share
> state between interpreters I believe.

All extensions share their state between interpreters.  The import machinery
literally caches the module dict for an extension and uses that to
reinitialize any new instances.

But Martin's PEP on module init helps to deal with this issue.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070508/b5fe92bf/attachment-0001.html 

More information about the Python-3000 mailing list