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/03/04 10:29:45 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #9802: [ISSUE 9783][pulsar-client] avoid create too many HashedWheelTimer instances

eolivelli commented on a change in pull request #9802:
URL: https://github.com/apache/pulsar/pull/9802#discussion_r587343679



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
##########
@@ -93,7 +93,7 @@
     protected final ClientConfigurationData conf;
     private LookupService lookup;
     private final ConnectionPool cnxPool;
-    private final Timer timer;
+    private static final Timer timer = new HashedWheelTimer(getThreadFactory("pulsar-timer"), 1, TimeUnit.MILLISECONDS);;

Review comment:
       if you make this field `static` then you cannot stop it when you stop the PulsarClient.




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