import time import threadpool def say(str): print(str) time.sleep(3) name_list = [i for i in range(5)] pool = threadpool.ThreadPool(10) requests = threadpool.makeRequests(say, name_list) [pool.putRequest(req) for req in requests] pool.wait()
08-23
08-23