You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
The class NonBlockingStatsDClient is not thread-safe (and presumably it should be). The reason for this is that a static NumberFormat instance is shared among all threads, but this class itself is not thread-safe. See the "synchronization" section of the NumberFormat docs:
The class
NonBlockingStatsDClientis not thread-safe (and presumably it should be). The reason for this is that a staticNumberFormatinstance is shared among all threads, but this class itself is not thread-safe. See the "synchronization" section of theNumberFormatdocs:http://docs.oracle.com/javase/6/docs/api/java/text/NumberFormat.html
To fix this problem, either create a new NumberFormat for each call, or create one per thread, using a
ThreadLocal<NumberFormat>http://stackoverflow.com/questions/1285279/java-synchronization-issue-with-numberformat