本文整理匯總了Python中Ganga.Core.GangaThread.GangaThread._Thread__args方法的典型用法代碼示例。如果您正苦於以下問題:Python GangaThread._Thread__args方法的具體用法?Python GangaThread._Thread__args怎麽用?Python GangaThread._Thread__args使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Ganga.Core.GangaThread.GangaThread
的用法示例。
在下文中一共展示了GangaThread._Thread__args方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init_worker_threads
# 需要導入模塊: from Ganga.Core.GangaThread import GangaThread [as 別名]
# 或者: from Ganga.Core.GangaThread.GangaThread import _Thread__args [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)