Closed gehel closed 10 years ago
+1
Firstly, sorry for taking so long to get to this.
Looking at it now, I cannot see any reason for this to ever be a user thread, so, rather than taking your pull request, I'm just going to change the client to use a daemon thread in its executor.
Thanks a lot for the fix ! I did not want to introduce any change to the behaviour with my fix, but yes, deamon thread by default seems the right way to go ...
Correct shutdown of the NonBlockingStatsDClient should be done with the stop() method. But in case this method is not called, the JVM should still shutdown and not be prevented in doing so by a non-daemon thread.