Explaining the ThreadLocal

Introduction to ThreadLocal Java supports multi threading and provides many high level APIs to avoid running into the issues associated with multi threading. One of the concepts we discussed previously is called synchronization. You can read about synchronization in this blog post. Here are few scenarios I would like to draw your attention: Thread Safety - classic case for using ThreadLocal Not all the classes in the Java library are thread safe, also the user defined classes are mostly not thread safe. At many places on the web you will find posts related ThreadLocal  with one example o...
Read More