Skip to content
Commit 1342b78b authored by Ceki Gulcu's avatar Ceki Gulcu
Browse files

Fixed LBCORE-67

I prefer
  try {
    r.lock();
    doSomething();
  } finally  {
    r.unlock();
  }
  
instead of 

  r.lock();
  try {
    doSomething();  
  } finally  {
    r.unlock();
  }

  because I think that the lock is held for a shorter time (however small it may be).
  In case r.lock() throws an exception, we are probably screwed in both approaches.
parent a7c42ca8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment