def pool_map():
x=[i for i in range (50) if i%2==0]
#print x
start=time.time()
'''
for i in x:
single(i)
print "time used " , time.time()-start
'''
#using multiprocess
p=Pool(2)
s=p.map(single,x)
p.close()
p.join()
print s
print len(s)
print "end. Time used: ",time.time()-start
评论列表
文章目录