logo       

Reloading thread variables: msg#00016

java.jsr.166-concurrency

Subject: Reloading thread variables

Hi,
Suppose that we have a class that is used by many threads. This class behavior is dependent of one of its fields. This field can be modified by any threads and it it modified very rarely. Finally, the class must offer very high performances.

So, when the field value change, I'm wondering if restarting all threads (stoping live threads and creating new ones) that use this class would ensure that they see the new field value? If yes, I will not be forced to declare the field volatile (thus no overhead).

Or do you have another idea to reload thread registers?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise