Configure the inputs to interrupt on change then wait for changes. This function is called when a DAQ HAT interrupt occurs. print("Interrupt number {}".format(user ...
As far as I can tell this is not feasible to fix (without adding a non-insignificant delay on shutdown) with python-libusb1 because it does not include a binding for libusb_interrupt_event_handler(), ...