abstractdog commented on a change in pull request #1280:
URL: https://github.com/apache/hive/pull/1280#discussion_r458688040



##########
File path: storage-api/src/java/org/apache/hive/common/util/BloomKFilter.java
##########
@@ -527,20 +527,19 @@ public void add(ElementWrapper wrapper) {
     @Override
     public void run() {
       while (!executor.isTerminated() && !queue.isEmpty()) {

Review comment:
       thanks, your comment regarding isTerminated check seems valid, let me 
think that over
   
   queue.isEmpty() check is needed I think, please a take a look at the 
implementation above, every thread uses its own queue (which is filled in 
advance), there is no concurrency between them, so queue.isEmpty() is a simple 
check for every thread that "whether I have further things to do, or I can 
quit",  this way every thread will quit once they're ready, so 
executor.awaitTermination will return and we're done




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

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