nealeu commented on code in PR #3122:
URL: https://github.com/apache/fory/pull/3122#discussion_r2685637533
##########
java/fory-core/src/main/java/org/apache/fory/Fory.java:
##########
@@ -105,6 +106,7 @@ public final class Fory implements BaseFory {
private static final boolean isLittleEndian = ByteOrder.nativeOrder() ==
ByteOrder.LITTLE_ENDIAN;
private static final byte BITMAP = isLittleEndian ? isLittleEndianFlag : 0;
private static final short MAGIC_NUMBER = 0x62D4;
+ private static final AtomicInteger runtimeHashCounter = new AtomicInteger(0);
Review Comment:
Pooled Fory is relevant because we are incrementing the codegen suffix in
the Fory constructor which is called by
```
private static Fory newFory(ForyBuilder builder, ClassLoader classLoader) {
try {
return new Fory(builder, classLoader);
```
for creating new instances for the pool.
We do therefore need to keep the computeIfAbsent approach that you used
originally, but add in the hash.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]