Friday, June 22, 2018

Thread Local in Java


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

Hyderabad Trip - Best Places to visit

 Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...