This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General and the fly likes ThreadLocal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ThreadLocal" Watch "ThreadLocal" New topic


Dhaval Shah
Ranch Hand

Joined: Jun 10, 2005
Posts: 56
Can anyone please tell me the significance of ThreadLocal class ? i.e. as per the application point of view

Thanks and Regards,<br />Dhaval Shah<br />SCJP 1.4<br />SCWCD 1.4
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Have a look at:

[My Blog] [JavaRanch Journal]
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Some people find it helpful to conceptualise a thread local as being an associative type that is keyed by the type Thread. Simply, a Map<Thread, T>. The analogy is quite useful and not dangerous (i.e. there is little opportunity to be misled).

Tony Morris
Java Q&A (FAQ, Trivia)
I agree. Here's the link:
subject: ThreadLocal
It's not a secret anymore!