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

Method getThread

MCSL2Lib/utils.py:341–348  ·  view source on GitHub ↗

获取一个正在运行的线程

(cls, name)

Source from the content-addressed store, hash-verified

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:

Callers 1

__init__Method · 0.80

Calls 1

hasThreadMethod · 0.80

Tested by

no test coverage detected