title: Atomically grab multiple locks
body: <p>Assume we have to undertake a transfer between any 2 accounts(among hunders out there) as part of a transaction.<br>
  And there would be multiple similar transactions running concurrently in a typical multi-threaded environment.<br>
  Usual convention would be as below(maintaining the lock order as per a pre-designed convention):  </p>
  
  <pre><code>lock account A
  lock account B
  transfer(A,B)
  release B
  release A
  </code></pre>
  
  <p>Is there any way to attempt the locks and release as an atomic operation?</p>