When running this code
运行此代码时
def f(t):
time.sleep(t)
return t
with ThreadPoolExecutor(max_workers=300) as pool:
res = list(pool.map(f, [2, 10], timeout=1))
def f(t):
When running this code
运行此代码时
def f(t):
time.sleep(t)
return t
with ThreadPoolExecutor(max_workers=300) as pool:
res = list(pool.map(f, [2, 10], timeout=1))
def f(t):