[Python-ideas] Python 3000 TIOBE -3%

Guido van Rossum guido at python.org
Thu Feb 9 20:42:57 CET 2012

On Thu, Feb 9, 2012 at 11:19 AM, Matt Joiner <anacrolix at gmail.com> wrote:

> > The GIL annoys those who have learned to expect threading.Thread for CPU
> > bound concurrency in advance -- which typically means prior experience
> with
> > Java. Python threads are fine for their intended use -- e.g. I/O and
> > background tasks in a GUI.
> Even for that purpose they're too heavy. The GIL conflicts, and
> boilerplate overhead spawning threads is obscene for more than trivial
> cases.

I'd actually say that using OS threads is too heavy *specifically* for
trivial cases. If you spawn a thread to add two numbers you'll have a huge
overhead. If you spawn a thread to do something significant, the overhead
doesn't matter much.

Note that even in Java, everyone uses thread pools to reduce thread
creation overhead.

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120209/4f90ff39/attachment.html>

More information about the Python-ideas mailing list