You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/27 05:35:57 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #10352: Make Consumer thread safe and lock-free

315157973 commented on a change in pull request #10352:
URL: https://github.com/apache/pulsar/pull/10352#discussion_r620879062



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -957,10 +951,12 @@ private void closeConsumerTasks() {
     }
 
     private void failPendingReceive() {
-        if (pinnedExecutor != null && !pinnedExecutor.isShutdown()) {
-            failPendingReceives(this.pendingReceives);
-            failPendingBatchReceives(this.pendingBatchReceives);
-        }
+        internalPinnedExecutor.execute(() -> {
+            if (pinnedExecutor != null && !pinnedExecutor.isShutdown()) {

Review comment:
       But this queue is unbounded. If the thread pool is closed, can't throw an exception directly?




-- 
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:
users@infra.apache.org