关闭一个正在运行的线程
(cls, name)
| 349 | |
| 350 | @classmethod |
| 351 | def closeThread(cls, name) -> bool: |
| 352 | """ |
| 353 | 关闭一个正在运行的线程 |
| 354 | """ |
| 355 | if cls.hasThread(name): |
| 356 | th = cls.threads.pop(name) |
| 357 | th.quit() |
| 358 | th.wait() |
| 359 | th.deleteLater() |
| 360 | return True |
| 361 | else: |
| 362 | return False |
| 363 | |
| 364 | @classmethod |
| 365 | def closeAllThreads(cls) -> None: |