Skip to content

Commit

Permalink
Delete zstdLock
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavo committed Jan 19, 2024
1 parent c11ef8f commit f2cd93c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions boot/src/main/java/org/glavo/japp/boot/JAppReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ public static JAppBootArgs openSystemReader(ByteBuffer bootArgs) throws IOExcept
return args;
}

private final ReentrantLock zstdLock = new ReentrantLock();

private final FileChannel channel;
private final long baseOffset;

Expand Down Expand Up @@ -245,13 +243,8 @@ public ByteArrayPool getPool() {
}

@Override
public void decompressZstd(ByteBuffer input, ByteBuffer output) {
zstdLock.lock();
try {
decompressor.decompress(input, output);
} finally {
zstdLock.unlock();
}
public synchronized void decompressZstd(ByteBuffer input, ByteBuffer output) {
decompressor.decompress(input, output);
}

public Map<String, JAppResourceGroup> getRoot(JAppResourceRoot root) {
Expand Down

0 comments on commit f2cd93c

Please sign in to comment.