def main_threaded(iniconfig):
semaphore = BoundedSemaphore(CONCURRENCY_LIMIT)
tasks = []
for appid in iniconfig:
section = iniconfig[appid]
task = Thread(target=checker, args=(section, appid, semaphore))
tasks.append(task)
task.start()
try:
for t in tasks:
t.join()
except KeyboardInterrupt:
for t in tasks:
if hasattr(t, 'terminate'): # multiprocessing
t.terminate()
print 'Validation aborted.'
sys.exit(1)
validateupdaterini.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录