Topic RSS17:20, EEST
April 3, 2012
OfflineHi,
In general we do try to make/fix most methods as threadsafe as possible, from the point of view that they should not randomly break on any thread execution scheduling. In practice however this is (unfortunately) not documented and not all methods might be threadsafe.
Multiple concurrent updateValue/setValue (at least in the context of CacheVariable that most of them are) generally do not make sense, but in general the end result should be that one of them (randomly) is the final value of the node. In general java does not have any deterministic locking (depends on the JVM impls), so the last thread to put the value to the node wins. The backed field is volatile, so it should be seen by all threads calling getValue().
What kinds of problems did you encounter?

Log In
Register