[Python-Dev] Pythonic concurrency
abo at minkirri.apana.org.au
Mon Oct 10 20:39:58 CEST 2005
On Mon, 2005-10-10 at 18:59, Bill Janssen wrote:
> > The problem with threads is at first glance they appear easy...
> Anyone who thinks that a "glance" is enough to understand something is
> too far gone to worry about. On the other hand, you might be
> referring to a putative brokenness of the Python documentation on
> Python threads. I'm not sure they're broken, though. They just point
> out the threading that Python provides, for folks who want to use
> threads. Are they required to provide a full course in threads?
I was speaking in general, not about Python in particular. If anything,
Python is one of the simplest and safest platforms for threading (thanks
mostly to the GIL). And I find the documentation excellent :-)
> > ...which seduces many beginning programmers into using them.
> Don't worry about this. That's how "beginning programmers" learn.
Many other things "beginning programmers" learn very quickly break if
you do it wrong, until you learn to do it right. Threads are tricky in
that they can "mostly work", and it can be a long while before you
realise it is actually broken.
I don't know how many bits of other people's code I've had to fix that
worked for years until it was run on hardware fast enough to trigger
that nasty race condition :-)
Donovan Baarda <abo at minkirri.apana.org.au>
More information about the Python-Dev