• Post Reply Bookmark Topic Watch Topic
  • New Topic

ThreadLocal  RSS feed

 
Dhaval Shah
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please tell me the significance of ThreadLocal class ? i.e. as per the application point of view
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!