Synchronized code relies on a simple kind of reentrant lock. This kind of lock is easy to use, but has many limitations.