Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Parallel map is built in to Python already with pools.

    import requests
    import multiprocessing as mp
    
    pool = mp.Pool()
    urls = ["http://httpbin.org/get?a=#{}".format(i) for i in range(100)]
    pool.map(requests.get, urls)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: