decorators vs GIL

Anthony Baxter anthonybaxter at gmail.com
Sun Aug 8 04:16:46 EDT 2004


On Sun, 08 Aug 2004 00:00:25 -0400, Istvan Albert
<ialbert at mailblocks.com> wrote:
> Just because someone sits down and codes it does not mean it
> should be added to the language. Features are forever, you
> cannot just can't eliminate them in the next version.

The discussion on decorators has been going on for over 2 years
on python-dev. There is a broad concensus that they're a useful
feature, and are not _just_ being added for PyObjC.

As far as "fixing" the GIL - well, no-one on Python-Dev has obviously
found it to be a problem for them. I certainly can't recall a time in the
last 5 years where the GIL has been a problem in any application I've
written (including a number of heavily threaded applications). Coding
threaded applications in Python does require _knowledge_ of the GIL,
true, but there's nearly always ways to get around it.

As a couple of people have said already - if it's truly a problem for you,
you're able to do something about it. Either look into how it could be
fixed, or hell, pay someone else to work on it for you. No-one is going
to work on something merely because you assert that it is important.
Heck, put together a decent case for _why_ it is a problem.

Greg's free-threading patches for Python 1.4 were there for years.
The interest in them was so low that no-one was even interested 
in keeping them up-to-date with current Python (which would have
been a much smaller task than writing them from scratch). 

One final point is that with the various new implementations of 
Python (Jython, IronPython, Python-on-Parrot, Python-on-smalltalk-VM,
Python-on-Scheme-VM) it's quite possible that one or more of 
these new implementations won't have the GIL. You might look into
one of these implementations, and if it looks good to you, contribute!

This is not saying "fix it yourself". This is saying "the people who 
work on Python, in their own spare time (almost no-one is paid
to hack on Python) don't consider that the GIL is an issue for 
them". You can't just say "fix it!" and expect volunteers to do the
work for you.

Anthony



More information about the Python-list mailing list