ReentrantLock: Lock/Unlock speed in single-threaded application
i’m using some ReentrantLock to synchronize access to a List across multiple threads. I just write a generic try { lock.lock(); … modify list here } finally { lock.unlock(); } everywhere. …