ChimeraTK / ControlSystemAdapter

An adapter layer which allows to use control applications with different control system software environments.
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Fix implementation of PersistentDataStorage #11

Closed mhier closed 5 years ago

mhier commented 7 years ago

At the moment the implementation of PersistentDataStorage is somewhat bad, I had to hack it in a big hurry during precious ELBE beam time. Right now, it is not properly implementing the data exchange between the thread calling PersistentDataStorage::updateValue() and the thread periodically writing out the data. It works because on a time scale of 30 seconds (the periodicity of writing out the data) the data will be visible to other threads even without a memory barrier - but of course this is not the way to do it.

This should be fixed by using an atomic triple buffer. Also the periodicity should be configurable and not hard-coded to 30 seconds.

killenb commented 5 years ago

Solved in 8a6510f8d93346e58675027610800f8f11bb5ca7