avoid deadlock in proxy
in secop.proxy the callers modules method announceUpdate is called from an other thread while the accessLock is locked, creating a deadlock. solve this by creating an other lock 'updateLock' for the update. + add status parameter even to non-Readable proxy modules, in order to indicate a failed connection + fix an error in secop_psi/softcal.py Change-Id: Iae7c6d5a74001150a47aa9dc99209c15d972cd5e Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/28130 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -191,7 +191,7 @@ class Sensor(Readable):
|
||||
|
||||
def initModule(self):
|
||||
super().initModule()
|
||||
self._rawsensor.registerCallbacks(self, ['status']) # auto update status
|
||||
self.rawsensor.registerCallbacks(self, ['status']) # auto update status
|
||||
self._calib = CalCurve(self.calib)
|
||||
if self.description == '_':
|
||||
self.description = '%r calibrated with curve %r' % (self.rawsensor, self.calib)
|
||||
@ -220,4 +220,4 @@ class Sensor(Readable):
|
||||
self.status = self.Status.ERROR, self._value_error
|
||||
|
||||
def read_value(self):
|
||||
return self._calib(self._rawsensor.read_value())
|
||||
return self._calib(self.rawsensor.read_value())
|
||||
|
Reference in New Issue
Block a user