If tryLock fails to get the lock another gc has it

Change-Id: Ifd3bbcc5e0591883b774d23256949a83010ea134
This commit is contained in:
Matthias Sohn 2023-02-22 20:36:39 +01:00
parent 1691e38779
commit d9f75e8bb2
1 changed files with 1 additions and 1 deletions

View File

@ -1650,7 +1650,7 @@ boolean lock() throws IOException {
channel = f.getChannel();
lock = channel.tryLock();
if (lock == null || !lock.isValid()) {
failedToLock();
gcAlreadyRunning();
return false;
}
channel.write(ByteBuffer