def __init__(self): self.interrupts = Interrupts() self.items = [self.interrupts] thrd = NosignalingThread(target=self._inthread, name="interrupts_mon") thrd.daemon = True thrd.start() self._thrd = thrd
def start_identify(self, seconds=3): """ :type seconds: int NOTE: this ioctl is blocking(!). Thanks to ethtool API. So, will run in thread... """ cmd = ethtool_value(cmd=ETHTOOL_PHYS_ID, data=seconds) thread_name = 'if_{0}_wait'.format(self.index) thr = NosignalingThread(target=partial(self._do_ethtool, cmd), name=thread_name) thr.daemon = True thr.start()