aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ThreadLocal" Watch "ThreadLocal" New topic
Author

ThreadLocal

Cory Wilkerson
Ranch Hand

Joined: Aug 14, 2001
Posts: 84
Looking to clarify here:
Given:

If threads foo, bar, and fizzle all create instances of class X -- can I simply call: X.local.get() (from the context of each thread) and be returned the long associated with "local" when the X instance was created?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Yes, that's right.
[ July 11, 2003: Message edited by: Ernest Friedman-Hill ]

[Jess in Action][AskingGoodQuestions]
 
 
subject: ThreadLocal