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 written that post!

Comments: 1 (feed)

  1. svetlyak40wt

    Однако, второй раз за сегодня читаю статью, в которой упоминается "local reasoning"! И как раз сегодня размышлял над тем, так ли это плохо, что в изучаемом мною сейчас Arc lisp такая убогая поддержка многопоточности.

Add comment

Format with markdown