a new PEP?

Martin v. Löwis martin at v.loewis.de
Wed Jan 8 04:47:57 EST 2003


vm_usenet at yahoo.com (vm_usenet) writes:

> > With the current implementation strategy, this is not necessarily a
> > problem. The existing extension modules should cope with it just fine;
> > third-party (i.e. your) extension modules don't work correctly, they
> > need to be fixed.
> 
> This is not correct - trying it out on various schemas failed because
> global variables are in conflict with each other when true
> multithreading is introduced.

Then you missed the scheme that works. Python can well accommodate
multiple threads simultaneously, and still have global variables all
over the place. The Global Interpreter Lock (GIL) safely protects
access to these variables. If you had been running into problems
because of this, you have failed to acquire the thread when you should
have done so.

Regards,
Martin





More information about the Python-list mailing list