threadpool 方法调用多个参数实例

#!/usr/bin/python3

import threadpool

def moreParamFunc(a,b,c,d):
 print(a,b,c,d)
return 0

 

#调用4个参数...

pushParam = [1,'two',3,4]

func_var = [(pushParam,None)]
requests = threadpool.makeRequests(moreParamFunc,func_var)
[pool.putRequest(req) for req in requests]

pool.wait()

 

  

posted @ 2020-11-30 14:30  SimpleSmile  阅读(384)  评论(0编辑  收藏  举报