szetszwo commented on pull request #153: URL: https://github.com/apache/incubator-ratis/pull/153#issuecomment-660572843
> For example, OOM happen when new AutoCloseableLock. We may simple call new first ``` public static AutoCloseableLock acquire(final Lock lock, Runnable preUnlock) { final AutoCloseableLock a = new AutoCloseableLock(lock, preUnlock); lock.lock(); return a; } ``` > Besides AutoCloseableLock is not thread safe, ... Could you give an example? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org