self.sleep_time = sleep_time

def run(self):
    self.running = True
i = 0
while self.running:
    i += 1
self.beep.emit(i)
time.sleep(self.sleep_time)

def stop(self):
    self.running = False

def update_value(self, value):
    self.sleep_time = value
In PyQt, what is the best way to share data between the main window and a thread