3 ms·
Parallel map is built in to Python already with pools. import requests import multiprocessing as mp pool = mp.Pool() urls = ["http://httpb
by lars512 10y ago
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)