OverlappingFileLockException when trying to lock a filechannel twice in shared mode
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Sep 14 22:28:03 UTC 2023
A "concurrently running program” means a separate process. You are attempting to acquire two overlapping locks in the same process.
Brian
On Sep 14, 2023, at 2:21 PM, Siddharth Jain <siddhsql at gmail.com<mailto:siddhsql at gmail.com>> wrote:
https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/nio/channels/FileLock.html
A file lock is either exclusive or shared. A shared lock prevents other concurrently-running programs from acquiring an overlapping exclusive lock, but does allow them to acquire overlapping shared locks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20230914/bf17f62a/attachment.htm>
More information about the nio-dev
mailing list