Last active
July 24, 2016 09:58
-
-
Save tkfx/0f69d8fdb8b80ccdf66465f0539e73fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final ThreadLocal<Integer> counter = new ThreadLocal<Integer>(); | |
private static void handleRequest() { | |
if (counter.get() == null) { | |
counter.set(0); | |
} | |
counter.set(counter.get() + 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment