4 ms·
Rather than the strange threading logic (perhaps using a threadpool executor [0] would be a better idea), I’d encourage you to check out aiohttp [1] instead of
by dfee 8y ago
Rather than the strange threading logic (perhaps using a threadpool executor [0] would be a better idea), I’d encourage you to check out aiohttp [1] instead of requests.
[0] https://docs.python.org/3/library/concurrent.futures.html https://docs.python.org/3/library/concurrent.futures.html
[1] https://docs.aiohttp.org/en/stable/client.html https://docs.aiohttp.org/en/stable/client.html
- solotronics 8y agodeco is easy to use way to do all the hard parts of multiprocessing pool in python https://github.com/alex-sherman/deco https://github.com/alex-sherman/deco