<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
A "concurrently running program” means a separate process. You are attempting to acquire two overlapping locks in the
<i class="">same</i> process.
<div class=""><br class="">
</div>
<div class="">Brian<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 14, 2023, at 2:21 PM, Siddharth Jain <<a href="mailto:siddhsql@gmail.com" class="">siddhsql@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><a href="https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/nio/channels/FileLock.html" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/nio/channels/FileLock.html</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div style="caret-color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class="">A file lock is either </span><i style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class="">exclusive</i><span style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class=""> or </span><i style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class="">shared</i><span style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class="">.
A shared lock prevents other </span><span style="color: rgb(53, 56, 51); font-style: normal; font-size: 14px;" class=""><b class="">concurrently-running programs</b></span><span style="font-family: Helvetica; font-style: normal; font-weight: 400; font-size: 12.16px; color: rgb(53, 56, 51);" class="">
from acquiring an overlapping exclusive lock,<span class="Apple-converted-space"> </span><b class="">but does allow them to acquire overlapping shared locks.</b></span></div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>