MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / closeThread

Method closeThread

MCSL2Lib/utils.py:351–362  ·  view source on GitHub ↗

关闭一个正在运行的线程

(cls, name)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 1

hasThreadMethod · 0.80

Tested by

no test coverage detected