_input_lock = threading.RLock()
class RtiDDSReader(threading.Thread):
def __init__(self, connector, topic_name):
super().__init__()
self.connector = connector
self.topic_name = topic_name
self.input = self.connector.get_input(f'SoaSubscriber::Soa{self.topic_name}Reader')
def run(self):
while self.running:
self.input.wait()
with _input_lock:
self.input.take()
for sample in self.input.samples.valid_data_iter:
data = sample.get_dictionary() # This could be the entrance to the termination
The threads that subscribe to these messages run in the background of my pyqt program and do not involve gui updates, but each time a certain number of messages are subscribed, the main program and these background threads terminate and exit without error codes.
The threads that subscribe to these messages run in the background of my pyqt program and do not involve gui updates, but each time a certain number of messages are subscribed, the main program and these background threads terminate and exit without error codes.