Creates a synthetic main loop so that threads can still run.
(self)
| 23 | |
| 24 | @threadbox.MetaBox.thread |
| 25 | def mainloop(self): |
| 26 | "Creates a synthetic main loop so that threads can still run." |
| 27 | while True: |
| 28 | try: |
| 29 | self.update() |
| 30 | except tkinter.TclError: |
| 31 | break |
| 32 | else: |
| 33 | time.sleep(tkinter._tkinter.getbusywaitinterval() / 1000) |
| 34 | |
| 35 | threadbox.MetaBox.clone(tkinter.Misc, {'mainloop': mainloop}) |
| 36 |
no test coverage detected