I have a static variable that I would like to be unique per thread.
Is this the case for all static variables? Or can it not be guaranteed. That is, will threads occasionally update the static variable's value in the main memory, or keep it to themselves?
If this cannot be guaranteed, is there any type of variable in Java that is both static and thread-unique? Something essentially global to a thread, but hidden from other threads?
ThreadLocalis for. Although I would be curious to know what you are storing in this static variable and why you believe you need a unique one for each thread.