I was wondering if
synchronize (lock) {
...
}
Where lock is an instance of java.util.concurrent.locks.Lock
, treats lock
like any other object or as the try-finally idiom i.e.
lock.lock();
try {
...
} finally {
lock.unlock();
}