Share via


It's threads that are hard!

I was very happy to find Edward Lee's excellent talk on the problem(s) with threads available online. The lecture was given at Microsoft Research in January this year, but I haven't found it available outside MS before.

If you care at all about understanding why making concurrency mainstream is not about educating programmers on how to write multi-threaded code and be careful about lock ordering, this will be a good use of an hour of your life. In fact, it's worth coming back to at regular intervals:

https://ptolemy.eecs.berkeley.edu/~eal/videos/EALatMSR_Jan07/lecture.htm

Ed Lee makes a very strong case that it's not concurrency that is hard, it's the model we have chosen to use to model concurrency in current software frameworks, i.e. threads and locks.

Some quotes from the video:

If the state of your physical universe can change completely from one instant to the next, there's something wrong with your physcial universe.

If the programs are fundamentally incomprehensible, it doesn't matter how diligent the programmers are, they're still not going to understand their programs. ... understanding your program is the surest way to get it to work.

Listening to this presentation again makes me very optimistic about the future: there are solutions, they are feasible for a majority of programmers, and concurrency isn't intrinsically hard. We've just made it hard by choosing the wrong tools.