问题:1-100个数多线程打印
import threadpool def pool_num(num,p_methond,num_list): pool=threadpool.ThreadPool(num) #声明线程池个数 reqs=threadpool.makeRequests(p_methond,num_list) #线程池请求 [pool.putRequest(req) for req in reqs] #线程池 pool.wait() def p_methond(num): print(num) num_list=[i for i in range(1,101)] pool_num(3,p_methond,num_list)