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?
|