获取一个正在运行的线程
(cls, name)
| 339 | |
| 340 | @classmethod |
| 341 | def getThread(cls, name) -> Optional[QThread]: |
| 342 | """ |
| 343 | 获取一个正在运行的线程 |
| 344 | """ |
| 345 | if cls.hasThread(name): |
| 346 | return cls.threads[name] |
| 347 | else: |
| 348 | raise RuntimeError("This thread is not running or not exists.") |
| 349 | |
| 350 | @classmethod |
| 351 | def closeThread(cls, name) -> bool: |