The title talks about Thread::sleep because they are the most common problem. But locks can pose the same problem.