LiangliangSui commented on code in PR #1525:
URL: https://github.com/apache/incubator-fury/pull/1525#discussion_r1567228314


##########
java/fury-core/src/main/java/org/apache/fury/pool/ClassLoaderFuryPooled.java:
##########
@@ -122,6 +124,20 @@ private void addFury() {
   }
 
   void setFactoryCallback(Consumer<Fury> factoryCallback) {

Review Comment:
   ```java
   ThreadSafeFury safeFury = Fury.builder()
       .requireClassRegistration(true)
       .buildThreadSafeFury();
   safeFury.register(A.class);
   safeFury.register(B.class);
   
   // Thread A
   new Thread(() -> {
     safeFury.serialize(new A());
   }).start();
   
   // Thread B
   new Thread(() -> {
     // processCallback(fury -> fury.register(clz));
     safeFury.register(C.class);
     safeFury.serialize(new C());
   }).start();
   ```
   
   As shown in the above Demo, how can we avoid `safeFury.register(C.class)` 
being called in Thread B.



-- 
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]

Reply via email to