Home > other >  Python set the queue
Python set the queue

Time:11-30

Wrote a automation, can only use the request access API, then learn a little bit of thread, want to use a thread to improve efficiency, but found that if at the same time create dozens of thread, send request will reach limit, cannot receive respond effectively, want to consult everybody, my idea is dozens of threads run at the same time, but send the request queue turn to, set a delay in the middle, not traffic jam,
Or do you have any other good idea, thank you for your advice, python is a small white one, and go to school for two days,

CodePudding user response:

Ha ha, why so?

After the request returns, in front of the back of the request will naturally start

Set the delay will only more slowly, not fast

CodePudding user response:

Change process, thread lock

CodePudding user response:

Change processes have a try

CodePudding user response:

Can reference scrapy design patterns, asynchronous publishing tasks, multithreading corresponding results,

  • Related