Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is ThreadLocal , why use it? thx!  RSS feed

 
Javan Li
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx!
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/j2se/1.4/docs/api/java/lang/ThreadLocal.html
It is used to associate a variable that is private and owned by a thread. It exists as long as the thread is alive and can be used to store information that is exclusive to the thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!