So I know that you could use grequests
create multiple requests and use map
to process them at the same time. But how do you create some requests on the fly while some requests sent have not returned a response yet? I don't want to use multiprocessing or multithreading,is there a way to use grequests to realize it?
Asked
Active
Viewed 68 times
0

Haoyu
- 49
- 1
- 7
1 Answers
0
Just use the regular requests library for this. A call to res = requests.get(...)
is asynchronous anyway, it will not block until you call something like "res.content". Is this what you are looking for?

pdowling
- 470
- 4
- 11
-
I don't think this is correct. I believe request itself is blocking. [Python Requests non-blocking? duplicate](http://stackoverflow.com/questions/14245989/python-requests-non-blocking) – Haoyu Nov 20 '15 at 02:55