[Python-Dev] The endless GIL debate: why not remove thread support instead?

"Martin v. Löwis" martin at v.loewis.de
Fri Dec 19 00:55:19 CET 2008


> OK, but how close is it to providing isolation for threads running
> under the control of the GIL? 

They won't be indedepent. If an extension module has a global variable,
that will be shared across interpreters. If that variable supports
modifiable state, such modifications will "leak" across interpreters.

For example, there will be only a single object class. With that in
mind, take a look at object.__subclasses__(); it would provide access
to all classes, including those in the other interpreters. Likewise,
gc.get_objects() will give you the complete list of all objects. So
the isolation is not strong enough to run untrusted code isolated
from other code.

Regards,
Martin


More information about the Python-Dev mailing list