python 实现多线程运行
from multiprocessing import Process, Queue
import multiprocessing
cores = multiprocessing.cpu_count()
pool = multiprocessing.Pool()
p0 = Process(target=main, args=(params,1))
p1 = Process(target=main, args=(params,2))
p2 = Process(target=main, args=(params,3))
p3 = Process(target=main, args=(params,4))
......
p0.start()
p1.start()
p2.start()
p3.start()
......
p0.join()
p1.join()
p2.join()
p3.join()
......