Multithreaded programming has been an important part of much of what I’ve worked on in the past couple of decades. However, a lot of my work has been on high-performance server-side technologies where speed is as important as reliability and stability. Taking maximum advantage of parallel hardware technologies such as multicore processors, and synchronous multiprocessing (SMP), is a key part of maximizing performance. For some developers, particularly those starting out in the mobile device space, multithreaded programming can be pretty new. Up until this past year or so, mobile devices used a single processor. So, other than cycle-stealing or avoiding situations where you locked up the UI for extended periods, there wasn’t all that much to be gained by writing apps with multiple threads. The rise of dual-core processors (and the forthcoming quad-core processors) has made multithreaded programming more attractive, simply because there are speed advantages to be had.
To that end, I thought it would be useful for some people to have a lightweight introduction to multithreaded programming. This first primer is one of a series I hope to build up over time (my next primer will probably be on iOS observers. I get a lot of hits everyday on an early post I did on that topic). Keep in mind that the goal of this primer is not meant to be exhaustive. There are better works available to treat the subject in far more detail. My goal is to provide someone with a foundation on multithreaded programming, and enough background that they can be productive in it and will have the grounding they need if they want to explore the topic further.
The link to the primer is here. You will need some kind of PDF reader to be able to read the document. Hopefully it someone finds it useful.