Closed mbellani closed 7 years ago
Thanks, it's a bug, i will fix it ASAP.
2017-07-02 0:45 GMT+08:00 Manish Bellani notifications@github.com:
hello
We have been using xmemcached client for some time in production and it seems to be working pretty well. We recently discovered that when we call shutdown on net.rubyeye.xmemcached.aws.AWSElasticCacheClient it doesn't actually stop the underlying net.rubyeye.xmemcached.aws. ConfigurationPoller's ThreadPoolExecutor. When looking through the code it seems like there are few different ways to approach it
- We remove final from net.rubyeye.xmemcached. XMemcachedClient#shutdown and override it in net.rubyeye.xmemcached.aws.AWSElasticCacheClient and call configPoller.shutdown() there. but since i don't fully understand the design decision for making it final i am not sure if that's a good idea.
Another way to do this would be to add following code to net.rubyeye.xmemcached.aws.ConfigurationPoller:
public void run() { if(client.isShutdown()){ stop(); return; }
Either one will do the trick and i am happy to make the change and open a PR if you like.
Thanks Manish
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/killme2008/xmemcached/issues/61, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA3PhX_LcLagyOgLZoQpP7GLpLy7WRmks5sJne7gaJpZM4OLXGw .
-- 庄晓丹 Email: killme2008@gmail.com Site: http://fnil.net
不学习,毋宁死
hello
We have been using xmemcached client for some time in production and it seems to be working pretty well. We recently discovered that when we call shutdown on
net.rubyeye.xmemcached.aws.AWSElasticCacheClient
it doesn't actually stop the underlyingnet.rubyeye.xmemcached.aws.ConfigurationPoller
'sThreadPoolExecutor
. When looking through the code it seems like there are few different ways to approach itnet.rubyeye.xmemcached.XMemcachedClient#shutdown
and override it innet.rubyeye.xmemcached.aws.AWSElasticCacheClient
and call configPoller.shutdown() there. but since i don't fully understand the design decision for making it final i am not sure if that's a good idea.net.rubyeye.xmemcached.aws.ConfigurationPoller
:Either one will do the trick and i am happy to make the change and open a PR if you like.
Thanks Manish