本文整理汇总了Python中Ganga.Core.GangaThread.GangaThread._command方法的典型用法代码示例。如果您正苦于以下问题:Python GangaThread._command方法的具体用法?Python GangaThread._command怎么用?Python GangaThread._command使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ganga.Core.GangaThread.GangaThread
的用法示例。
在下文中一共展示了GangaThread._command方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init_worker_threads
# 需要导入模块: from Ganga.Core.GangaThread import GangaThread [as 别名]
# 或者: from Ganga.Core.GangaThread.GangaThread import _command [as 别名]
def __init_worker_threads(self, num_worker_threads, worker_thread_prefix):
if len(self.__worker_threads) > 0:
logger.warning("Threads already started!")
for i in self.__worker_threads:
logger.info("Worker Thread: %s is already running!" % i.gangaName)
return
for i in range(num_worker_threads):
t = GangaThread(name=worker_thread_prefix + str(i), auto_register=False, target=self.__worker_thread)
t._Thread__args = (t,)
t._name = worker_thread_prefix + str(i)
t._command = "idle"
t._timeout = "N/A"
t.start()
self.__worker_threads.append(t)