[#2021] No need to synchronize for unpooled chunks
This commit is contained in:
parent
17f5865e38
commit
14600167d6
@ -151,13 +151,15 @@ abstract class PoolArena<T> {
|
|||||||
buf.initUnpooled(newUnpooledChunk(reqCapacity), reqCapacity);
|
buf.initUnpooled(newUnpooledChunk(reqCapacity), reqCapacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized void free(PoolChunk<T> chunk, long handle) {
|
void free(PoolChunk<T> chunk, long handle) {
|
||||||
if (chunk.unpooled) {
|
if (chunk.unpooled) {
|
||||||
destroyChunk(chunk);
|
destroyChunk(chunk);
|
||||||
} else {
|
} else {
|
||||||
|
synchronized(this) {
|
||||||
chunk.parent.free(chunk, handle);
|
chunk.parent.free(chunk, handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PoolSubpage<T> findSubpagePoolHead(int elemSize) {
|
PoolSubpage<T> findSubpagePoolHead(int elemSize) {
|
||||||
int tableIdx;
|
int tableIdx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user