There is a typo in the demo code.  boost::mutex::scoped_lock lock3(Thread1Lock) should be Thread3Lock, and the same for 4.  However, I still get the same errors as before.