(self)
| 1396 | self.finished.set() |
| 1397 | |
| 1398 | def run(self): |
| 1399 | self.finished.wait(self.interval) |
| 1400 | if not self.finished.is_set(): |
| 1401 | self.function(*self.args, **self.kwargs) |
| 1402 | self.finished.set() |
| 1403 | |
| 1404 | |
| 1405 | # Special thread class to represent the main thread |