📜  python 3中的地图 - Python代码示例

📅  最后修改于: 2022-03-11 14:47:17.204000             🧑  作者: Mango

代码示例6
from multiprocessing import Pool

def test( v ):
    print(v)
    return v

if __name__ == '__main__':
    with Pool(2) as p:
        print(p.map(test, range(5)))