title: Simple Deadlock Examples
body: <p>I would like to explain threading deadlocks to newbies. I have seen many examples for deadlocks in the past, some using code and some using illustrations (like the famous <a href="http://www.cs.fsu.edu/~baker/cop5611.S03/graphics/F6-1.jpg">4 cars</a>). There are also classic easily-deadlocked problems like <a href="http://en.wikipedia.org/wiki/Dining_philosophers_problem">The Dining Philosophers</a>, but these may be too complex for a real newbie to fully grasp.</p>
  
  <p>I'm looking for the simplest code example to illustrate what deadlocks are. The example should:</p>
  
  <ol>
  <li>Relate to a "real" programming scenario that makes some sense</li>
  <li>Be very short, simple and straight forward</li>
  </ol>
  
  <p>What do you recommend?</p>