 determine whether a deadlock should result in our retrying the
    operation. We also declare a  <code class="literal">retry_count</code> variable
    that is used to make sure we do not retry a transaction forever in the
    unlikely event that the thread is unable to ever get a necessary lock.
    (The only thing that might cause this is if some other thread dies
    while holding an important lock. This is the only code that we have to
    guard against that because the simplicity of this application ma