Created
August 2, 2016 14:02
-
-
Save tkfx/08818456f3aa0c9dece71733719eb2fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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>() { | |
| @Override protected Integer initialValue() { | |
| return 0; | |
| } | |
| }; | |
| private static void handleRequest() { | |
| counter.set(counter.get() + 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment