Web framework for Python. One of the best ways to develop for the web.
Universal identifier for Internet users

Other topics…

Articles (feed)

Glyph Lefkowitz on threads


I value very much the ability to put complex concepts into words in a systematic manner. And I thrive to do the same (at least, I did try when I was blogging actively). So now I'm a big fan of Glyph who laid out everything that is problematic about threads: Unyielding.

It starts with definitions of terms and an exhaustive description of the problem. Not just "everyone knows threads are bad" but "threads have such and such problems which lead to these even bigger problems, and here are the usual solutions". Then he goes on through all the items never leaving unanswered questions or gaps.

There was only one moment:

green or lightweight threads are indeed threads, in that they present these same problems. In the long run, when you build a system that relies upon them, you eventually have all the pitfalls and dangers of full-blown preemptive threads. Which, as shown above, are bad.

… after which I said, "no, wait, that thing above is rather different, so analogy doesn't work". But he didn't left it hanging either and explained it with not one but two examples.

The point of the post itself resonates with me very strongly, and I think it is an important topic to discuss. But the most valuable thing for me in it was to see a clear explanation of why exactly "explicit is better than implicit" in this particular case. I'm never satisfied with simply believing in what feels right, I like to know why :-).

I wish it was me who'd write that post!



ijson 1.0


New life of Marcus


ijson on PyPy, Episode 3: New parsing


Dark corners of JavaScript prototypes


Scientists, engineers and teachers


Where's that future everyone is talking about?


OAuth is not a protocol


Hiring: you're doing it wrong



Comments (feed)