
The Python GIL Visualized - fogus
http://dabeaz.blogspot.com/2010/01/python-gil-visualized.html
======
njharman
Step 1: Don't use threads.

Step 2: If you think you need threads, revisit your design.

Step 3: If you ignored step 2 and/or still think you really need threads use
one of the GILless Python implementations.

Step 4: If you can't/don't wanna use one of the GILless Python implementations
then pick another language. There's plenty to choose from.

Step 5: We all get to read about stuff more interesting and important than the
GIL.

~~~
jnoller
Wrong. Wrong, and Wrong. Plenty of people - all over the world including
myself - can use threads (and python threads) perfectly well understanding
their limitations. It does benefit our applications just fine.

That said, this GIL drum does get old.

~~~
tetha
In my opinion, threads are in a similar vein like goto and eval.

It is true, that a good, disciplined programmer with the goal of a performant
application with simple and good code can use gotos in a way which enhances
the code, and he can use threads to enhance the performance without bringing
all living hell down on people around him.

However, it is also true that a lot of people who only consider themself to be
a good programmer want to use threads, gotos and all these powerful
constructs, and because some dude called tetha said that good programmers can
use them well, they will use them. But since they are not good programmers, a
mess will happen.

Thus, strongly advocating against threads -- while wrong -- is still right in
my opinion.

Granted, I don't want to go off-topic too much, but I cannot talk about the
GIL too much, because the matter is too delicate and complicated for me.
Sometimes the GIL enhances performance, sometimes it degrades it. Live with
it, and if you really need parallelism, use the libraries out there for it.

~~~
jnoller
I'm surprised; I find threads both conceptually simple, easy to explain and
criminally easy to use - it's when you start talking about locks,
semaphores/etc things sort of go sideways for most people.

