Will the ThreadLocal object be cleared after thread returned to Thread Pool?
问题 Will the contents that are stored in the ThreadLocal storage during an execution be cleared automatically when the thread is returned to ThreadPool (as would be expected) ?? In my application I am putting some data in ThreadLocal during some execution but if next time the same Thread is being used, then I am finding the obsolete data in ThreadLocal storage. 回答1: The ThreadLocal and ThreadPool don't interact with one another unless you do this. What you can do is a a single ThreadLocal which