Concurrency – A paper and a war story
Today I came across two nicely related blog posts. In the first, Alexander Schatten gives excerpts from a paper (PDF) detailing what a lot of people have a sneaking suspicion about: getting concurrency right is really really tricky, even if you know what you’re doing. I’m glad the paper discusses listeners in a multi-threaded environment because every deadlock I’ve had lately seems to involve listeners being invoked while a lock is held.
In the second blog post, Marc relates a great war story where he channels Gene Kranz from Apollo 13: “Let’s work the problem people. Let’s not make things worse by guessing”. It’s really a textbook example of systematically understanding and working through a problem. In relation to concurrency, the problem he tracks down and fixes is a perfect example of how tricky multi-threading can be.