We recently updated our system:
We noticed that the exit function tango::leavefunc hangs after a device server terminates, if this server has subscribed to a tango event at some point.
Here's a simple device server to reproduce this problem (make sure the polling is enabled on sys/tg_test/1/State):
import PyTango.server
class Dummy(PyTango.server.Device):
__metaclass__ = PyTango.server.DeviceMeta
def init_device(self):
self.proxy = PyTango.DeviceProxy('sys/tg_test/1')
self.eid = self.proxy.subscribe_event(
'State', PyTango.EventType.CHANGE_EVENT, self.cb)
def cb(self, ev):
print(ev)
def delete_device(self):
self.proxy.unsubscribe_event(self.eid)
Dummy.run_server()
print('Done!')
# atexit will now call PyTango.__leavefunc and hang