DanGuge commented on code in PR #2312:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2312#discussion_r1328038836


##########
hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java:
##########
@@ -43,55 +43,55 @@ public final class Consumers<V> {
     public static final int THREADS = 4 + CoreOptions.CPUS / 4;
     public static final int QUEUE_WORKER_SIZE = 1000;
     public static final long CONSUMER_WAKE_PERIOD = 1;
+    private static final Object QUEUE_END = new VWrapper(null);

Review Comment:
   `QUEUE_END` will be put at the end of `BlockingQueue<VWrapper<V>> queue`, so 
it will be cast to `VWrapper<V>`.
   
   If we just use `new Object()` instead, we will get the exception below.
   
   <img width="709" alt="image" 
src="https://github.com/apache/incubator-hugegraph/assets/77946882/3ea7d102-bfde-4543-9531-c384e7ef5cea";>
   



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