Reference - http://tutorials.jenkov.com/java-concurrency/threadlocal.html#creating-a-threadlocal
The ThreadLocal class in Java enables you to create variables that can only be read and written by the same thread. Thus, even if two threads are executing the same code, and the code has a reference to a ThreadLocal variable, then the two threadscannot see each other's ThreadLocal variables.
No comments:
Post a Comment