标签:mit task highlight div 使用 false future cut imp
# 多线程
from concurrent.futures import ThreadPoolExecutor
# 多进程
from concurrent.futures import ProcessPoolExecutor
import time
def task(i):
print(i)
time.sleep(1)
pool = ThreadPoolExecutor(10)
for index in range(1000):
pool.submit(task,index)
print(‘end‘)
标签:mit task highlight div 使用 false future cut imp
原文地址:http://www.cnblogs.com/iwxk/p/6761672.html